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.
- Can you confirm the issue with
az cli sp show command returning a different ID than the object id?
- If it is different can you add a warning to the documentation page saying why
- 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.
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:
Which returns
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
--queryand returned the entire object and don't see the GUID from portal anywhere using theaz cliresult 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.
az clisp showcommand returning a different ID than the object id?az cliso that I could retrieve the object id?Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.