-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
az ad
returns a Graph object without objectId
property
#22328
Comments
@jiasli for awareness |
Okay, I think I know whats happening here.
I see the expected result. Seems like this is a result of a different key name in the response. With AAD Graph the return is named Feels like this (and probably other instances elsewhere im sure) should be added to https://docs.microsoft.com/en-us/cli/azure/microsoft-graph-migration?view=azure-cli-latest&tabs=powershell#breaking-changes |
Exactly.
Azure CLI prints the JSON returned by Microsoft Graph as-is, so https://docs.microsoft.com/en-us/graph/migrate-azure-ad-graph-property-differences#directoryobject-property-differences should be the single source of truth. |
az ad user list
when there is a --query
parameteraz ad user list
when there is a --query
parameter with objectId
Added as requested: MicrosoftDocs/azure-docs-cli#3122 Now https://learn.microsoft.com/en-us/cli/azure/microsoft-graph-migration reads:
|
az ad user list
when there is a --query
parameter with objectId
az ad
returns a Graph object without objectId
property
Actions we took to announce the Microsoft Graph migration:
However, if someone skips all versions through 2.34.0 and 2.37.0 and also doesn't check the documents or GitHub repo, they will not be able to see any warnings for the breaking change. I think that's why we are receiving issues again recently for breaking changes caused by Microsoft Graph migration. |
Related command
az ad user list --filter "startswith(userPrincipalName, 'user1@dev.acme.com.au') or startswith(userPrincipalName, 'user2@dev.acme.com.au') or startswith(userPrincipalName, 'user3@dev.acme.com.au')" --query '[].objectId' -o tsv
Describe the bug
The output of the command changes depending on whether the GA CLI or Beta CLI is used.
To Reproduce
Note that with the Beta CLI the command returns no results.
Expected behavior
The results returned should not change depending on which version of the CLI is used.
Environment summary
Additional context
If I remove the
--query
parameter from the beta cli I get:The text was updated successfully, but these errors were encountered: