diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Connect-SPOService.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Connect-SPOService.md index 40662c91d..8441a88f2 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Connect-SPOService.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Connect-SPOService.md @@ -20,6 +20,7 @@ This cmdlet must be run before any other SharePoint Online cmdlets can run. ## SYNTAX ### AuthenticationLocation + ``` Connect-SPOService -Url [-Credential ] [-ClientTag ] [-Region ] [-ModernAuth ] [-UseSystemBrowser ] @@ -27,6 +28,7 @@ Connect-SPOService -Url [-Credential [-Credential ] [-ClientTag ] -AuthenticationUrl [-ModernAuth ] [-UseSystemBrowser ] [] @@ -86,14 +88,14 @@ Connects to a SharePoint Online Administration Center specifying the region. ### EXAMPLE 5 - ```powershell +```powershell Connect-SPOService -Credential $creds -Url https://tenant-admin.sharepoint.com -ModernAuth $true -AuthenticationUrl https://login.microsoftonline.com/organizations ``` Connecting to SPO Service with ModernAuth Flag. ### EXAMPLE 6 - ```powershell +```powershell Connect-SPOService -Url https://contoso-admin.sharepoint.com -UseSystemBrowser $true ``` Authenticates using the Microsoft Authentication Library (MSAL) and connects to the SharePoint Online Administration Center on successful authentication. @@ -158,7 +160,7 @@ Accept wildcard characters: False > Applicable: SharePoint Online - Ensures that SharePoint Online tenant administration cmdlets can connect to the service using modern TLS protocols. +Ensures that SharePoint Online tenant administration cmdlets can connect to the service using modern TLS protocols. To use it you also need to provide the **AuthenticationUrl** parameter. @@ -173,6 +175,7 @@ Default value: None Accept pipeline input: False Accept wildcard characters: False ``` + ### -Region > Applicable: SharePoint Online @@ -217,7 +220,15 @@ Accept wildcard characters: False > Applicable: SharePoint Online - Used to authenticate the user using the Microsoft Authentication Library (MSAL). +Used to authenticate the user using the Microsoft Authentication Library (MSAL). + +> [!NOTE] +> To avoid adding the `-UseSystemBrowser` parameter every time you run `Connect-SPOService`, you can set a registry key instead. +> +> Set the `UseSystemBrowser` registry key (type `REG_DWORD`) at: +`HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SPO\CMDLETS\` +> +> If either registry key is set to a non-zero integer value or `-UseSystemBrowser` parameter is set to `true`, authentication flow will use system browser for sign-in. ```yaml Type: System.Boolean