Open pmatthews05 opened 2 years ago
@jiasli for awareness
For context, with the BETA graph calls there is so much more information you can grab about the user when using the beta. Originally in my code I called az ad user
and queried/filtered on userType=Member. This ensured I didn't bring back any Guest users. Or the reverse userType=Guest.
With the latest cli, due to using MS Graph and V1.0 this property isn't available, only with beta.
Having a config, or switch to decide if you are calling the v1.0 or beta would be useful in general for any of the MS Graph calls.
Azure CLI currently doesn't have native support for beta API. We will consider this as a feature request.
Thanks @jiasli for the confirmation. With the recent swap from Windows Graph to Microsoft Graph, the lack of these properties will require this feature.
I can see two useful places to put the beta switch.
Alternative for now is just calling az rest --method get -url https://graph.microsoft.com/beta/users
However, I'm having a problem getting the next link to work. I've obtained the odata.nextLink, however, when trying to put that url in the next az rest url, because of the $ symbol in the next link, it fails to call it. Do you happen to know how I can escape the url correctly? I know that the escape character is ` but I haven't found a working valid way to escape the $ characters.
Describe the bug
When using
az ad user list
in the new version of AZ CLI 2.37.0, the result that comes back is the graph call https://graph.microsoft.com/v1.0/usersI would like to know if you can tell the az cli to use the Beta version of the MS Graph calls? https://graph.microsoft.com/beta/users
Command Name
az ad user list
Environment Summary
Additional Context