Skip to content

az ad sp create-for-rbac intermittent triggers error "When using this permission, the backing application of the service principal being created must in the local tenant" #18610

Description

This CLI command "az ad sp create-for-rbac" will intermittent triggers below error:
Error: When using this permission, the backing application of the service principal being created must in the local tenant
requestId:3896deac-4831-4503-a21b-eab9b467ca4f
Date: 2021-06-22T02:06:54

Troubleshooting:

POST: https://graph.windows.net/tenant_id/servicePrincipals?api-version=1.6 >> HTTP 201
Request body: {"accountEnabled": "True", "appId": "xxxxx"}
Request response: this application's generated data, like appid, object id

POST: https://graph.windows.net/tenant_id/servicePrincipals?api-version=1.6 >> HTTP 403
Request body: {"accountEnabled": "True", "appId": "xxxxx"}
Request response: code":"Authorization_RequestDenied","message":{"lang":"en","value":"When using this permission, the backing application of the service principal being created must in the local tenant"},"requestId":"3896deac-4831-4503-a21b-eab9b467ca4f","date":"2021-06-22T02:06:5

  • There is not any error can be found in the Azure AD audit log. All application generation seem to be successfully.
  • The issue can be mitigated after re-run this command again

the issue occur in the middle of service principal generation process. We request the further investigation on this CLI command process.

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Graph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az ad

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions