An API that connects multiple Microsoft services, enabling data access and automation across platforms
Yes—OAuth 2.0 authorization code flow is supported for Microsoft Graph in GCC High, but the application must be registered in Azure Government and use the GCC High identity and Graph endpoints rather than the commercial-cloud endpoints.
GCC High configuration
- Register the application through the Azure Government portal:
https://portal.azure.us. - In the app registration:
- Add the appropriate platform and redirect URI.
- Add the required delegated Microsoft Graph permissions.
- Grant administrator consent when the selected permissions require it.
- Use these GCC High endpoints:
- Microsoft Entra authority:
https://login.microsoftonline.us - Microsoft Graph root:
https://graph.microsoft.us - Do not use
login.microsoftonline.comorgraph.microsoft.com.
- Microsoft Entra authority:
Applications and tokens are isolated by cloud. A token acquired from the global identity service cannot be used against GCC High Microsoft Graph, and the application registration must exist in the corresponding national-cloud environment.^1^
Request the authorization code
Direct the user's browser to the GCC High authority, appending this authorization path:
/{tenant-id}/oauth2/v2.0/authorize
Include these query parameters:
client_id={application-client-id}
response_type=code
redirect_uri={URL-encoded-registered-redirect-URI}
response_mode=query
scope=openid offline_access User.Read
state={random-CSRF-value}
code_challenge={PKCE-challenge}
code_challenge_method=S256
Use the actual GCC High tenant ID instead of a commercial tenant or consumer account endpoint. The redirect URI must exactly match one registered for the application. After sign-in and consent, Microsoft Entra redirects the browser to that URI with code and state query parameters.^2^
The authorization code is therefore not created locally: it is issued after the user completes interactive authentication and consent at the /authorize endpoint.
For scopes:
- Short delegated scopes such as
User.ReadandMail.Readare valid. - A fully qualified GCC High scope uses the
https://graph.microsoft.usdomain. - Request
offline_accessif the application needs a refresh token. - Request only permissions supported by the specific Graph API in GCC High.^3^
Redeem the code
Send a form-encoded POST to the same GCC High authority, appending:
/{tenant-id}/oauth2/v2.0/token
Example request body:
client_id={application-client-id}
&grant_type=authorization_code
&code={authorization-code}
&redirect_uri={same-redirect-URI}
&scope=openid offline_access User.Read
&code_verifier={original-PKCE-verifier}
For a confidential server-side web application, authenticate the application with its configured client credential. Public clients—including SPAs and native applications—must not put a client secret in browser or distributed client code. PKCE is recommended for all application types and required for SPAs.^2^
Use the resulting access token against GCC High Graph:
GET /v1.0/me HTTP/1.1
Host: graph.microsoft.us
Authorization: Bearer {access-token}
SDK configuration
If using a Microsoft Graph SDK, configure both sides explicitly:
- Authentication provider authority: Azure Government /
https://login.microsoftonline.us - Graph client base URL:
https://graph.microsoft.us - GCC High scope, where fully qualified:
https://graph.microsoft.us/.default
The SDK defaults to the global Microsoft Graph service unless overridden.^3^
Graph Explorer is not supported for GCC High, so test through the registered application, an API client, or your own callback handler instead.^1^
References