Skip to content

Commit 4658055

Browse files
authored
Merge pull request #1070 from dangshubham/patch-2
Enhance Connect-SPOService.md with additional examples
2 parents b7ec283 + d264d9f commit 4658055

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Connect-SPOService.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,30 @@ Connect-SPOService -Url https://contoso-admin.sharepoint.com -UseSystemBrowser $
109109
```
110110
Authenticates using the Microsoft Authentication Library (MSAL) and connects to the SharePoint Online Administration Center on successful authentication.
111111

112+
### EXAMPLE 7
113+
114+
```powershell
115+
$password = Read-Host -Prompt "Enter certificate password" -AsSecureString
116+
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
117+
```
118+
Connect to the SharePoint Online service using an app identity and a certificate file path, with an optional password.
119+
120+
### EXAMPLE 8
121+
122+
```powershell
123+
Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId 00000000-0000-0000-0000-000000000000 -Tenant 11111111-1111-1111-1111-111111111111 -CertificateThumbprint "3FAAAA1111AAAAAAAAAAA2222AAAAAAAAAAAAAAA"
124+
```
125+
Connect to the SharePoint Online service using an app identity and a certificate thumbprint.
126+
127+
### EXAMPLE 9
128+
129+
```powershell
130+
$thumbprint = "3F2A5C9D4E7B8A1234567890ABCDEF1234567890"
131+
$cert = Get-ChildItem Cert:\LocalMachine\My\$thumbprint
132+
Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId 00000000-0000-0000-0000-000000000000 -Tenant 11111111-1111-1111-1111-111111111111 -Certificate $cert
133+
```
134+
Connect to the SharePoint Online service using an app identity and a certificate object.
135+
112136
## PARAMETERS
113137

114138
### -AuthenticationUrl

0 commit comments

Comments
 (0)