Skip to content

az ad sp create-for-rbac: flakiness #1332

@ahmetb

Description

@ahmetb

The following cmd sometimes returns error, but the actual AAD app is created (but not the SP):

$ az ad sp create-for-rbac --scopes /subscriptions/xxxxxx/resourcegroups/gggggg/providers/Microsoft.ContainerRegistry/registries/nnnn \
 --role Owner --password "$azure_client_secret" \
 --years 2 --name http://foo-bar-ahmetb/

ERROR: Resource 'ServicePrincipal_00e1c5b1-394e-48ca-a1b7-f39b77635928' does not exist or one of its queried reference-property objects are not present.

When I do az ad sp show --id http://foo-bar-ahmetb/, I got error:

ERROR: service principal 'http://foo-bar-ahmetb/' doesn't exist

but az ad app show --id http://foo-bar-ahmetb/ worked just fine.

So it looks like create-for-rbac probably is running into some replication delay issue or somethign else from AAD and therefore erroring out, possibly having created the AAD App but not the SP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions