Skip to content

Commit 27bb666

Browse files
committed
Adding sovereign cloud examples and update environment tables
- Updated environment output tables with BleuCloud, DelosCloud, and GovSGCloud - Added Example 12: connecting to a sovereign cloud with a custom application - Added Example 13: disabling WAM when authentication hangs in sovereign clouds - Added DisableLoginByWAM example to Set-MgGraphOption - Renumbered existing examples to accommodate new entries
1 parent 880cc45 commit 27bb666

3 files changed

Lines changed: 40 additions & 14 deletions

File tree

src/Authentication/examples/Connect-MgGraph.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,33 @@ Uses a user created managed identity as a standalone Azure resource.
6565
### Example 11: Connecting to an environment or cloud
6666
```powershell
6767
PS C:\> Get-MgEnvironment
68-
Name AzureADEndpoint GraphEndpoint Type
69-
---- --------------- ------------- ----
70-
China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in
71-
Global https://login.microsoftonline.com https://graph.microsoft.com Built-in
72-
USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in
73-
USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in
68+
Name AzureADEndpoint GraphEndpoint Type
69+
---- --------------- ------------- ----
70+
BleuCloud https://login.sovcloud-identity.fr https://graph.svc.sovcloud.fr Built-in
71+
China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in
72+
DelosCloud https://login.sovcloud-identity.de https://graph.svc.sovcloud.de Built-in
73+
Global https://login.microsoftonline.com https://graph.microsoft.com Built-in
74+
GovSGCloud https://login.sovcloud-identity.sg https://graph.svc.sovcloud.sg Built-in
75+
USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in
76+
USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in
7477
PS C:\> Connect-MgGraph -Environment USGov
7578
```
7679
When you use Connect-MgGraph, you can choose to target other environments. By default, Connect-MgGraph targets the global public cloud.
7780

78-
### Example 12: Connecting to an environment as a different identity
81+
### Example 12: Connecting to a sovereign cloud with a custom application
82+
```powershell
83+
PS C:\> Connect-MgGraph -ClientId "YOUR_APP_CLIENT_ID" -TenantId "YOUR_TENANT_ID" -Environment BleuCloud -Scopes "User.Read.All"
84+
```
85+
Sovereign cloud environments (BleuCloud, DelosCloud, GovSGCloud) require a custom application registration. You cannot use the default Microsoft Graph PowerShell application in these environments. When registering your application, add an additional redirect URI of `ms-appx-web://Microsoft.AAD.BrokerPlugin/<YOUR_APP_CLIENT_ID>` to support WAM broker-based authentication. Requires Microsoft.Graph.Authentication v2.36.1 or later.
86+
87+
### Example 13: Connecting to a sovereign cloud when WAM authentication hangs
88+
```powershell
89+
PS C:\> Set-MgGraphOption -DisableLoginByWAM $true
90+
PS C:\> Connect-MgGraph -ClientId "YOUR_APP_CLIENT_ID" -TenantId "YOUR_TENANT_ID" -Environment BleuCloud
91+
```
92+
If the authentication popup hangs or times out when connecting to a sovereign cloud (for example, from a jumpbox), WAM broker-based login may not work in that environment. Disable WAM to use interactive browser sign-in instead. You only need to run `Set-MgGraphOption -DisableLoginByWAM $true` once; the setting persists across sessions.
93+
94+
### Example 14: Connecting to an environment as a different identity
7995
```powershell
8096
PS C:\> Connect-MgGraph -ContextScope Process
8197
```
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
### Example 1: Get-MgEnvironment
22
```powershell
33
PS C:\> Get-MgEnvironment
4-
Name AzureADEndpoint GraphEndpoint Type
5-
---- --------------- ------------- ----
6-
China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in
7-
Global https://login.microsoftonline.com https://graph.microsoft.com Built-in
8-
USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in
9-
USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in
4+
Name AzureADEndpoint GraphEndpoint Type
5+
---- --------------- ------------- ----
6+
BleuCloud https://login.sovcloud-identity.fr https://graph.svc.sovcloud.fr Built-in
7+
China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in
8+
DelosCloud https://login.sovcloud-identity.de https://graph.svc.sovcloud.de Built-in
9+
Global https://login.microsoftonline.com https://graph.microsoft.com Built-in
10+
GovSGCloud https://login.sovcloud-identity.sg https://graph.svc.sovcloud.sg Built-in
11+
USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in
12+
USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in
1013
```
1114
This command gets list of all environments.

src/Authentication/examples/Set-MgGraphOption.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@
33
PS C:\> Set-MgGraphOption -EnableLoginByWAM $True
44
```
55
Sets web account manager support
6-
Note: Signin by Web Account Manager (WAM) is enabled by default on Windows and cannot be disabled. Setting this option will no longer have any effect.
6+
Note: Signin by Web Account Manager (WAM) is enabled by default on Windows and cannot be disabled. Setting this option will no longer have any effect.
7+
8+
### Example 2: Disable WAM for sovereign cloud environments
9+
```powershell
10+
PS C:\> Set-MgGraphOption -DisableLoginByWAM $true
11+
PS C:\> Connect-MgGraph -ClientId "YOUR_APP_CLIENT_ID" -TenantId "YOUR_TENANT_ID" -Environment BleuCloud
12+
```
13+
If WAM broker-based authentication hangs or times out when connecting to a sovereign cloud environment (such as BleuCloud, DelosCloud, or GovSGCloud), disable WAM to fall back to interactive browser sign-in. This can occur when authenticating from environments like jumpboxes. The setting persists across PowerShell sessions.

0 commit comments

Comments
 (0)