You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Connect-MicrosoftTeams cmdlet connects to Microsoft Teams with an authenticated account for use with cmdlets from the MicrosoftTeams PowerShell module. After executing this cmdlet, you can disconnect from MicrosoftTeams account using Disconnect-MicrosoftTeams.
46
47
47
48
## EXAMPLES
48
49
49
-
### Example 1
50
+
### Example 1: Connect to MicrosoftTeams
51
+
This example connects to an Azure account. You must provide a Microsoft account or organizational ID credentials. If multi-factor authentication is enabled for your credentials, you must log in using the interactive option.
Prompts for user credentials to connect and manage a Microsoft Teams environment.
60
+
### Example 2: Connect to MicrosoftTeams
61
+
The first command prompts for user credentials and stores them in the $Credential variable. The second command connects to an Azure account using the credentials stored in $credential. This account authenticates with Azure using organizational ID credentials.
Specifies that the organization being managed is in the Teams GCC High environment, so connect to that environment.
71
+
### Example 3: Connect to MicrosoftTeams in a specific environment
72
+
This example connects to an Azure account in a specific environment. You must provide a Microsoft account or organizational ID credentials. If multi-factor authentication is enabled for your credentials, you must log in using the interactive option.
Connects to Microsoft Teams PowerShell using a Certificate and an applicationId.
81
+
### Example 4: Connect to MicrosoftTeams using Accesstokens
82
+
This example demonstrates how to sign in using AccessTokens. Admin can reterive Access Tokens. It requires two tokens, MS Graph Access Token and Teams Resource token.
$graphtoken = #Get MSGraph Token for following for resource "https://graph.microsoft.com" and scopes "AppCatalog.ReadWrite.All", "Group.ReadWrite.All", "User.Read.All";
86
+
$teamstoken = #Get Teams resource token for resource id "48ac35b8-9aa8-4d74-927d-1f4a14a0b239" and scope "user_impersonation";
@@ -292,22 +331,6 @@ Specify "TeamsGCCH" if your organization is in the GCC High Environment. Specif
292
331
Type: String
293
332
Parameter Sets: UserCredential
294
333
Aliases:
295
-
296
-
Required: False
297
-
Position: Named
298
-
Default value: None
299
-
Accept pipeline input: False
300
-
Accept wildcard characters: False
301
-
```
302
-
303
-
### -ConfigAccessToken
304
-
{{ Fill ConfigAccessToken Description }}
305
-
306
-
```yaml
307
-
Type: String
308
-
Parameter Sets: AccessToken
309
-
Aliases:
310
-
311
334
Required: False
312
335
Position: Named
313
336
Default value: None
@@ -322,7 +345,6 @@ Login using managed service identity in the current environment.
322
345
Type: SwitchParameter
323
346
Parameter Sets: ManagedServiceLogin
324
347
Aliases: MSI, ManagedService
325
-
326
348
Required: True
327
349
Position: Named
328
350
Default value: None
@@ -337,7 +359,6 @@ Host name for managed service login.
337
359
Type: String
338
360
Parameter Sets: ManagedServiceLogin
339
361
Aliases:
340
-
341
362
Required: False
342
363
Position: Named
343
364
Default value: None
@@ -352,7 +373,6 @@ Port number for managed service login.
352
373
Type: Int32
353
374
Parameter Sets: ManagedServiceLogin
354
375
Aliases:
355
-
356
376
Required: False
357
377
Position: Named
358
378
Default value: None
@@ -367,7 +387,6 @@ Secret, used for some kinds of managed service login.
367
387
Type: SecureString
368
388
Parameter Sets: ManagedServiceLogin
369
389
Aliases:
370
-
371
390
Required: False
372
391
Position: Named
373
392
Default value: None
@@ -385,16 +404,5 @@ For more information, see about_CommonParameters (https://go.microsoft.com/fwlin
385
404
## OUTPUTS
386
405
387
406
## NOTES
388
-
Tips for troubleshooting:
389
-
390
-
**1. Confirm SAML 2.0 is being used.**\
391
-
IDP is outputting invalid SAML information.
392
-
Needs to have SAML 2.0 vs.
393
-
SAML 1.0 for the module to connect.
394
-
You might experience an error if the Identity Provider (IDP) only allows the use of SAML 1.0 when trying to auth via basic authentication.
395
-
Which in turn, isn't expected to work because the cmdlet expects either OAUTH2 (which is used when doing just connect-microsofteams), or SAML 2.0.
396
-
397
-
**2. Confirm you have the latest version of the cmdlet.**\
398
-
You can find the version by running: \`get-module -listavailable\` and then looking for the MicrosoftTeams name and the version to the left of it. For more information and how to download the module, see [Teams PowerShell Overview](https://docs.microsoft.com/microsoftteams/teams-powershell-overview)
0 commit comments