about Microsoft Graph

Sandler, Irena (Irena) 0 Reputation points

Hi , i got request to change Graph URL https://graph.microsoft.com to support next URLs instead
Microsoft Graph global service: https://graph.microsoft.com
Microsoft Graph for US Government L4: https://graph.microsoft.us
Microsoft Graph for US Government L5 (DOD): https://dod-graph.microsoft.us
Microsoft Graph China operated by 21Vianet: https://microsoftgraph.chinacloudapi.cn but when i am trying to use it AcquireTokenForClient(new string[] { "https://graph.microsoft.us/.default" }).ExecuteAsync();, it returns an error error ResponseBody: {""error"":""invalid_scope"",""error_description"":""AADSTS1002012: The provided value for scope https://graph.microsoft.us/.default is not valid., but it works with AcquireTokenForClient(new string[] { "https://graph.microsoft.com/.default" }).ExecuteAsync();
any help appreciated

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,879 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Harpreet Singh Matharoo 7,301 Reputation points Microsoft Employee

    Hello @Sandler, Irena (Irena) ,

    Thank you for reaching out to Microsoft QnA platform. I assume the error you receiving is expected. Graph URL https://graph.microsoft.us/ can be only used by Application deployed on US Government National Entra ID Tenant.

    User's image

    Documentation Link: https://learn.microsoft.com/en-us/graph/deployments

    So, I assume the error you are receiving is expected if your application is hosted on a normal/commercial Entra ID tenant.

    I hope this answer helps to resolve your issue. Please "Accept the answer" if the information helped you. This will help us and others in the community as well.