Skip to content

Can you add notes or example about how to retrieve data from the app "manifest"? #23402

@mattmazzola

Description

@mattmazzola

I'm not sure if this is a product or documentation issue but if the issue is confirmed I think they could both be improved.

I recently created a new service principal and wanted to get the application ids and object ids.

If I use the Azure cli, and use commands similar to show on the page, I would do something like this:

az ad sp show --id bf360302-7aa5-48fc-82af-859abdf922c1 --query "{appId:appId, id:id}"

Which returns

{
  "appId": "bf360302-7aa5-48fc-82af-859abdf922c1",
  "id": "11265b2a-86b0-455f-ae4e-2636e2016d70"
}

I thought the "id" here WAS the Object ID.
However, if I view that SAME service principal in Azure Portal, it shows the "Object ID" as a different GUID!!

I then removed the --query and returned the entire object and don't see the GUID from portal anywhere using the az cli result and am wondering where the Portal is getting this information.

If I view the "Manifest" in the Portal, I can see the "id" property is the "Object ID" guid.

This would imply to me that the application manifest object is different than the azure resource object.

  1. Can you confirm the issue with az cli sp show command returning a different ID than the object id?
  2. If it is different can you add a warning to the documentation page saying why
  3. Can you add example showing how to return the application manifest for a service principal using the az cli so that I could retrieve the object id?

Document Details

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

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamGraph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adact-identity-squadfeature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions