Skip to content

Service principal id != name #6594

Description

@theheatDK

When you create a service principal like this:
az ad sp create-for-rbac --name mySP ...

and you want to show it. You have to use the URI not the name:
az ad sp show --id http://mySP

The help text for the show command states that --id should be "Service principal name, or object id."

Took me some time to figure out that the name I input for the create-for-rbac command is converted to a URI and that is what the show command needs as input.

It is not logical to me that it works like this and I assume it might stump others as well.

It would be nice with a description of this and some examples.

I don't know much about service principals and I am only using this to be able to create an AKS cluster.

[Enter feedback here]


Document Details

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

Metadata

Metadata

Assignees

Labels

Graph-cliquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions