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 2bf819d0e..8a5d6dfb5 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Connect-SPOService.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Connect-SPOService.md @@ -109,6 +109,30 @@ Connect-SPOService -Url https://contoso-admin.sharepoint.com -UseSystemBrowser $ ``` Authenticates using the Microsoft Authentication Library (MSAL) and connects to the SharePoint Online Administration Center on successful authentication. +### EXAMPLE 7 + +```powershell +$password = Read-Host -Prompt "Enter certificate password" -AsSecureString +Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId 00000000-0000-0000-0000-000000000000 -Tenant 11111111-1111-1111-1111-111111111111 -CertificatePath C:\Certs\ContosoAppAuth.pfx -CertificatePassword $password +``` +Connect to the SharePoint Online service using an app identity and a certificate file path, with an optional password. + +### EXAMPLE 8 + +```powershell +Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId 00000000-0000-0000-0000-000000000000 -Tenant 11111111-1111-1111-1111-111111111111 -CertificateThumbprint "3FAAAA1111AAAAAAAAAAA2222AAAAAAAAAAAAAAA" +``` +Connect to the SharePoint Online service using an app identity and a certificate thumbprint. + +### EXAMPLE 9 + +```powershell +$thumbprint = "3F2A5C9D4E7B8A1234567890ABCDEF1234567890" +$cert = Get-ChildItem Cert:\LocalMachine\My\$thumbprint +Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId 00000000-0000-0000-0000-000000000000 -Tenant 11111111-1111-1111-1111-111111111111 -Certificate $cert +``` +Connect to the SharePoint Online service using an app identity and a certificate object. + ## PARAMETERS ### -AuthenticationUrl