Skip to content

Commit 9de596a

Browse files
committed
Learn Editor: Update Connect-SPOService.md
1 parent 6ebed62 commit 9de596a

1 file changed

Lines changed: 54 additions & 61 deletions

File tree

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

Lines changed: 54 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -14,132 +14,123 @@ ms.reviewer:
1414

1515
## SYNOPSIS
1616

17-
Connects the SharePoint Online Administrator or the SharePoint Embedded Administrator to a SharePoint Online connection (the SharePoint Online Administration Center).
18-
This cmdlet must be run before any other SharePoint Online cmdlets can run.
17+
Connects a SharePoint Administrator or SharePoint Embedded Administrator to the SharePoint admin center. You must run this cmdlet before running any other SharePoint Online cmdlets.
1918

2019
## SYNTAX
2120

2221
### AuthenticationCertificate
2322

2423
```
25-
Connect-SPOService -Url <UrlCmdletPipeBind> [-ClientTag <String>]
26-
[-Region <AADCrossTenantAuthenticationLocation>] [-AuthenticationUrl <String>]
27-
[-Certificate <X509Certificate2>] [-CertificatePath <String>] [-CertificateThumbprint <String>]
28-
[-CertificatePassword <SecureString>] -ClientId <String> -TenantId <String> [<CommonParameters>]
24+
Connect-SPOService [-Url] <UrlCmdletPipeBind> [[-ClientTag] <String>] [-Region <AADCrossTenantAuthenticationLocation>] [-AuthenticationUrl <String>] [-Certificate <X509Certificate2>] [-CertificatePath <String>] [-CertificateThumbprint <String>] [-CertificatePassword <SecureString>] -ClientId <String> -TenantId <String> [<CommonParameters>]
2925
```
3026

3127
### AuthenticationLocation
3228

3329
```
34-
Connect-SPOService -Url <UrlCmdletPipeBind> [-Credential <CredentialCmdletPipeBind>] [-ClientTag <String>]
35-
[-Region <AADCrossTenantAuthenticationLocation>] [-ModernAuth <Boolean>] [-UseSystemBrowser <Boolean>]
36-
[<CommonParameters>]
30+
Connect-SPOService [-Url] <UrlCmdletPipeBind> [[-Credential] <CredentialCmdletPipeBind>] [[-ClientTag] <String>] [-Region <AADCrossTenantAuthenticationLocation>] [[-ModernAuth] <Boolean>] [[-UseSystemBrowser] <Boolean>]
3731
```
3832

3933
### AuthenticationUrl
4034

4135
```
42-
Connect-SPOService -Url <UrlCmdletPipeBind> [-Credential <CredentialCmdletPipeBind>] [-ClientTag <String>]
43-
-AuthenticationUrl <String> [-ModernAuth <Boolean>] [-UseSystemBrowser <Boolean>] [<CommonParameters>]
36+
Connect-SPOService [-Url] <UrlCmdletPipeBind> [[-Credential] <CredentialCmdletPipeBind>] [[-ClientTag] <String>] -AuthenticationUrl <String> [[-ModernAuth] <Boolean>] [[-UseSystemBrowser] <Boolean>] [<CommonParameters>]
4437
```
4538

4639
## DESCRIPTION
4740

48-
The `Connect-SPOService` cmdlet connects the SharePoint Online Administrator or the SharePoint Embedded Administrator to the SharePoint Online Administration Center.
49-
50-
Only a single SharePoint Online service connection is maintained from any single Windows PowerShell session.
51-
In other words, this is a per-geo within an organization administrator connection.
52-
Running the `Connect-SPOService` cmdlet twice implicitly disconnects the previous connection.
53-
The Windows PowerShell session will be set to serve the new SharePoint Online administrator specified.
54-
55-
A delegated partner administrator has to swap connections for different organizations within the same Windows PowerShell session.
56-
57-
You must be a SharePoint Online Administrator or a SharePoint Embedded Administrator to run the cmdlet.
58-
59-
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at [Intro to SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell).
41+
This cmdlet connects a SharePoint Administrator or SharePoint Embedded Administrator to the SharePoint admin center.
42+
Only one SharePoint Online service connection is supported per Windows PowerShell session and per geo within an organization. If you run this cmdlet again, the existing connection is automatically disconnected and replaced with the new connection. The PowerShell session then uses the newly specified administrator context.
43+
Delegated partner administrators must switch connections when managing multiple organizations within the same PowerShell session.
44+
To run this cmdlet, you must be a SharePoint Administrator or SharePoint Embedded Administrator.
45+
For permission requirements and the latest guidance, see the [Intro to SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell) documentation.
6046

6147
## EXAMPLES
6248

6349
### EXAMPLE 1
6450

6551
```powershell
66-
Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.com
52+
Connect-SPOService -Url https://contoso-admin.sharepoint.com -Credential admin@contoso.com
6753
```
6854

69-
Example 1 shows how a SharePoint Online administrator with credential admin@contoso.com connects to a SharePoint Online Administration Center that has the URL `<https://contoso-admin.sharepoint.com.>`
55+
This example shows how a SharePoint Administrator using the `admin@contoso.com` account connects to the SharePoint admin center at `https://contoso-admin.sharepoint.com`.
7056

7157
### EXAMPLE 2
7258

7359
```powershell
7460
$username = "admin@contoso.sharepoint.com"
75-
$password = "password"
76-
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)
61+
$password = Read-Host -Prompt "Enter user password" -AsSecureString
62+
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $userName, $password
7763
Connect-SPOService -Url https://contoso-admin.sharepoint.com -Credential $cred
7864
```
7965

80-
Example 2 shows how a SharePoint Online administrator with a username and password connects to a SharePoint Online Administration Center that has the URL `<https://contoso-admin.sharepoint.com.>`
66+
This example shows how a SharePoint Administrator connects to the SharePoint admin center at `https://contoso-admin.sharepoint.com` by creating a credential object from a username and password.
8167

8268
### EXAMPLE 3
8369

8470
```powershell
8571
Connect-SPOService -Url https://contoso-admin.sharepoint.com
8672
```
8773

88-
Prompts for credentials. This is required if the account is using multi-factor authentication.
74+
This example prompts for credentials. This approach is required when the account uses multi-factor authentication.
8975

9076
### EXAMPLE 4
9177

9278
```powershell
9379
Connect-SPOService -Url https://contoso-admin.sharepoint.com -Region ITAR
9480
```
9581

96-
Connects to a SharePoint Online Administration Center specifying the region.
82+
This example connects to the SharePoint admin center by specifying the authentication region.
9783

9884
### EXAMPLE 5
9985

10086
```powershell
10187
Connect-SPOService -Credential $creds -Url https://tenant-admin.sharepoint.com -ModernAuth $true -AuthenticationUrl https://login.microsoftonline.com/organizations
10288
```
103-
Connecting to SPO Service with ModernAuth Flag.
89+
90+
This example connects to the SharePoint admin center by using modern authentication.
10491

10592
### EXAMPLE 6
10693

10794
```powershell
10895
Connect-SPOService -Url https://contoso-admin.sharepoint.com -UseSystemBrowser $true
10996
```
110-
Authenticates using the Microsoft Authentication Library (MSAL) and connects to the SharePoint Online Administration Center on successful authentication.
97+
98+
This example authenticates by using the Microsoft Authentication Library (MSAL) and connects to the SharePoint admin center after authentication succeeds.
11199

112100
### EXAMPLE 7
113101

114102
```powershell
115103
$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
104+
Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId 00000000-0000-0000-0000-000000000000 -TenantId 11111111-1111-1111-1111-111111111111 -CertificatePath C:\Certs\ContosoAppAuth.pfx -CertificatePassword $password
117105
```
118-
Connect to the SharePoint Online service using an app identity and a certificate file path, with an optional password.
106+
107+
This example connects to the SharePoint admin center by using an app identity and a certificate file path, with an optional certificate password.
119108

120109
### EXAMPLE 8
121110

122111
```powershell
123-
Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId 00000000-0000-0000-0000-000000000000 -Tenant 11111111-1111-1111-1111-111111111111 -CertificateThumbprint "3FAAAA1111AAAAAAAAAAA2222AAAAAAAAAAAAAAA"
112+
Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId 00000000-0000-0000-0000-000000000000 -TenantId 11111111-1111-1111-1111-111111111111 -CertificateThumbprint "3FAAAA1111AAAAAAAAAAA2222AAAAAAAAAAAAAAA"
124113
```
125-
Connect to the SharePoint Online service using an app identity and a certificate thumbprint.
114+
115+
This example connects to the SharePoint admin center by using an app identity and a certificate thumbprint.
126116

127117
### EXAMPLE 9
128118

129119
```powershell
130120
$thumbprint = "3F2A5C9D4E7B8A1234567890ABCDEF1234567890"
131121
$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
122+
Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId 00000000-0000-0000-0000-000000000000 -TenantId 11111111-1111-1111-1111-111111111111 -Certificate $cert
133123
```
134-
Connect to the SharePoint Online service using an app identity and a certificate object.
124+
125+
This example connects to the SharePoint admin center by using an app identity and a certificate object.
135126

136127
## PARAMETERS
137128

138129
### -AuthenticationUrl
139130

140131
> Applicable: SharePoint Online
141132
142-
Location for Microsoft Entra Cross-Tenant Authentication service. Can be optionally used if non-default Cross-Tenant Authentication Service is used.
133+
Specifies the URL for the Microsoft Entra cross-tenant authentication service. Use this parameter when a non-default cross-tenant authentication endpoint is required.
143134

144135
```yaml
145136
Type: System.String
@@ -169,7 +160,7 @@ Accept wildcard characters: False
169160
170161
> Applicable: SharePoint Online
171162
172-
An X.509 certificate used during authentication.
163+
Specifies the X.509 certificate used for authentication.
173164
174165
```yaml
175166
Type: X509Certificate2
@@ -187,7 +178,7 @@ Accept wildcard characters: False
187178
188179
> Applicable: SharePoint Online
189180
190-
The password for the certificate file.
181+
Specifies the password for the certificate file.
191182
192183
```yaml
193184
Type: SecureString
@@ -205,7 +196,7 @@ Accept wildcard characters: False
205196
206197
> Applicable: SharePoint Online
207198
208-
The path to the local .pfx certificate file.
199+
Specifies the path to the local `.pfx` certificate file.
209200

210201
```yaml
211202
Type: String
@@ -223,7 +214,7 @@ Accept wildcard characters: False
223214

224215
> Applicable: SharePoint Online
225216

226-
The thumbprint of the certificate in the current user's certificate store.
217+
Specifies the thumbprint of the certificate in the current user's certificate store.
227218

228219
```yaml
229220
Type: String
@@ -241,7 +232,7 @@ Accept wildcard characters: False
241232

242233
> Applicable: SharePoint Online
243234

244-
The application's client ID.
235+
Specifies the client ID of the application.
245236

246237
```yaml
247238
Type: String
@@ -259,7 +250,7 @@ Accept wildcard characters: False
259250

260251
> Applicable: SharePoint Online
261252

262-
Permits appending a client tag to existing client tag. Used optionally in the CSOM http traffic to identify used script or solution.
253+
Optionally adds a client tag to CSOM HTTP traffic to help identify the calling script or solution.
263254

264255
```yaml
265256
Type: System.String
@@ -277,7 +268,7 @@ Accept wildcard characters: False
277268

278269
> Applicable: SharePoint Online
279270

280-
Specifies the credentials to use to connect. If no credentials are presented, a dialog will prompt for the credentials. The credentials must be those of a SharePoint Online administrator who can access the SharePoint Online Administration Center site.
271+
Specifies the credentials used to connect. If you do not provide credentials, you are prompted to enter them. The credentials must belong to an administrator who has access to the SharePoint admin center.
281272

282273
```yaml
283274
Type: Microsoft.Online.SharePoint.PowerShell.CredentialCmdletPipeBind
@@ -295,9 +286,8 @@ Accept wildcard characters: False
295286

296287
> Applicable: SharePoint Online
297288

298-
Ensures that SharePoint Online tenant administration cmdlets can connect to the service using modern TLS protocols.
299-
300-
To use it you also need to provide the **AuthenticationUrl** parameter.
289+
Enables modern authentication when connecting to SharePoint administration cmdlets.
290+
When you use this parameter, you must also specify the `AuthenticationUrl` parameter.
301291

302292
```yaml
303293
Type: System.Boolean
@@ -315,11 +305,9 @@ Accept wildcard characters: False
315305

316306
> Applicable: SharePoint Online
317307

318-
The valid values are: Default | ITAR | Germany | China
319-
320-
The default value is "default".
321-
322-
**Note**: The ITAR value is for GCC High and DoD tenancies only.
308+
Specifies the authentication region. Valid values are: `Default`, `ITAR`, `Germany`, and `China`.
309+
The default value is `Default`.
310+
**Note:** The `ITAR` value applies only to GCC High and DoD tenants.
323311

324312
```yaml
325313
Type: Microsoft.Online.SharePoint.PowerShell.AADCrossTenantAuthenticationLocation
@@ -337,7 +325,7 @@ Accept wildcard characters: False
337325

338326
> Applicable: SharePoint Online
339327

340-
The tenant ID to connect to.
328+
Specifies the ID of the tenant to connect to.
341329

342330
```yaml
343331
Type: String
@@ -355,7 +343,7 @@ Accept wildcard characters: False
355343

356344
> Applicable: SharePoint Online
357345

358-
Specifies the URL of the SharePoint Online Administration Center site.
346+
Specifies the URL of the SharePoint admin center.
359347

360348
```yaml
361349
Type: Microsoft.Online.SharePoint.PowerShell.UrlCmdletPipeBind
@@ -373,12 +361,12 @@ Accept wildcard characters: False
373361

374362
> Applicable: SharePoint Online
375363

376-
Used to authenticate the user using the Microsoft Authentication Library (MSAL).
364+
Uses the Microsoft Authentication Library (MSAL) to authenticate the user by using the system browser.
377365

378366
> [!NOTE]
379367
> To avoid adding the `-UseSystemBrowser` parameter every time you run `Connect-SPOService`, you can set a registry key instead.
380368
>
381-
> Set the `UseSystemBrowser` registry key (type `REG_DWORD`) at:
369+
> Set the `UseSystemBrowser` registry key (type `REG_DWORD`) at:
382370
`HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SPO\CMDLETS\`
383371
>
384372
> 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.
@@ -397,18 +385,23 @@ Accept wildcard characters: False
397385

398386
### CommonParameters
399387

400-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).
388+
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-ProgressAction`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).
401389

402390
## INPUTS
403391

392+
### Microsoft.Online.SharePoint.PowerShell.UrlCmdletPipeBind
393+
394+
### Microsoft.Online.SharePoint.PowerShell.CredentialCmdletPipeBind
395+
404396
## OUTPUTS
405397

398+
### System.Object
406399
## NOTES
407400

408401
## RELATED LINKS
409402

410-
[Introduction to the SharePoint Online management shell](https://support.office.com/en-us/article/introduction-to-the-sharepoint-online-management-shell-c16941c3-19b4-4710-8056-34c034493429)
403+
[Introduction to the SharePoint Online management shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell)
411404

412405
[Getting started with SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online)
413406

414-
[Disconnect-SPOService](Disconnect-SPOService.md)
407+
[Disconnect-SPOService](./Disconnect-SPOService.md)

0 commit comments

Comments
 (0)