issue with ms-graph token #26742
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
feature-request
Milestone
Describe the bug
Please let me know if this is in the wrong place.
I used the Azure CLI to generate ms-graph tokens. it works really well. Today was the first time I was using the token to try to find a file in my drive so I was trying
https://graph.microsoft.com/v1.0/me/drive/items/root/children
https://graph.microsoft.com/v1.0/me/drive/items/children
As both appear to work in the graph explorer (https://developer.microsoft.com/en-us/graph/graph-explorer)
However, when I try using the token generated from the cli I get a 404.
the me works though
https://graph.microsoft.com/v1.0/me
I used https://jwt.ms/ to compare the tokens. The only difference I could see is the
app_displayname and app_id
One of course is the info for graph explorer the other Microsoft Azure CLI
I tried to find the Microsoft Azure CLI in our enterprise apps but nothing. I tried to look to add it, and nothing came back. I have looked and cannot find anything on the web about it (I could easily missed sometehing). It look and feels like a slight glitch in the azure cli token generator.
Related command
az account get-access-token --resource "https://graph.microsoft.com" --tenant xxxxxx
Errors
when quring for certian data I get a 404
https://graph.microsoft.com/v1.0/me/drive/items/children
{
"error": {
"code": "itemNotFound",
"message": "Item not found",
"innerError": {
"date": "2023-06-23T18:12:03",
"request-id": "3760078b-d36c-4455-9eef-262bf883d1ac",
"client-request-id": "3760078b-d36c-4455-9eef-262bf883d1ac"
}
}
}
Issue script & Debug output
{
"error": {
"code": "itemNotFound",
"message": "Item not found",
"innerError": {
"date": "2023-06-23T18:12:03",
"request-id": "3760078b-d36c-4455-9eef-262bf883d1ac",
"client-request-id": "3760078b-d36c-4455-9eef-262bf883d1ac"
}
}
}
Expected behavior
I would expect the correct response similar to the graph explorer
Environment Summary
azure-cli 2.49.0
core 2.49.0
telemetry 1.0.8
Extensions:
account 0.2.5
azure-devops 0.26.0
Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0
Python (Linux) 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response
The text was updated successfully, but these errors were encountered: