Skip to content

Commit d635d31

Browse files
committed
Merge branch 'main' into Simulate-chrisda
2 parents e4ab317 + a5d0b44 commit d635d31

File tree

223 files changed

+8128
-2184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+8128
-2184
lines changed

.openpublishing.redirection.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6919,6 +6919,21 @@
69196919
"source_path": "exchange/virtual-folder/exchange/Update-EOPDistributionGroupMember.md",
69206920
"redirect_url": "/powershell/module/exchange/update-distributiongroupmember",
69216921
"redirect_document_id": false
6922+
},
6923+
{
6924+
"source_path": "exchange/virtual-folder/exchange/Get-DefaultTenantBriefingConfig.md",
6925+
"redirect_url": "/viva/insights/personal/reference/briefing-pause",
6926+
"redirect_document_id": false
6927+
},
6928+
{
6929+
"source_path": "exchange/virtual-folder/exchange/Set-DefaultTenantBriefingConfig.md",
6930+
"redirect_url": "/viva/insights/personal/reference/briefing-pause",
6931+
"redirect_document_id": false
6932+
},
6933+
{
6934+
"source_path": "teams/teams-ps/teams/New-CsTeamsShiftsConnectionTeamMap.yml",
6935+
"redirect_url": "https://review.learn.microsoft.com/en-us/powershell/module/teams/",
6936+
"redirect_document_id": false
69226937
}
69236938
]
69246939
}

exchange/docfx.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"overwrite": [],
7676
"externalReference": [],
7777
"globalMetadata": {
78+
"uhfHeaderId": "MSDocsHeader-M365-IT",
7879
"author": "chrisda",
7980
"ms.author": "chrisda",
8081
"manager": "serdars",

exchange/docs-conceptual/app-only-auth-powershell-v2.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: App-only authentication in Exchange Online PowerShell and Security & Comp
33
ms.author: chrisda
44
author: chrisda
55
manager: dansimp
6-
ms.date: 01/31/2023
6+
ms.date: 5/3/2023
77
ms.audience: Admin
88
audience: Admin
99
ms.topic: article
@@ -44,10 +44,6 @@ Certificate based authentication (CBA) or app-only authentication as described i
4444
>
4545
> You can use Microsoft Graph to replace most of the functionality from those cmdlets. For more information, see [Working with groups in Microsoft Graph](/graph/api/resources/groups-overview).
4646
>
47-
> - In Security & Compliance PowerShell, you can't use the procedures in this article with the following cmdlets:
48-
> - [Get-ComplianceCase](/powershell/module/exchange/get-compliancecase)
49-
> - [Get-CaseHoldPolicy](/powershell/module/exchange/get-caseholdpolicy)
50-
>
5147
> - Delegated scenarios are supported in Exchange Online. The recommended method for connecting with delegation is using GDAP and App Consent. For more information, see [Use the Exchange Online PowerShell v3 Module with GDAP and App Consent](/powershell/partnercenter/exchange-online-gdap-app). You can also use multi-tenant applications when CSP relationships are not created with the customer. The required steps for using multi-tenant applications are called out within the regular instructions in this article.
5248
>
5349
> - If the procedures in this article don't work for you, verify that you don't have Beta versions of the PackageManagement or PowerShellGet modules installed by running the following command: `Get-InstalledModule PackageManagement -AllVersions; Get-InstalledModule PowerShellGet -AllVersions`.
@@ -65,7 +61,7 @@ The following examples show how to use the Exchange Online PowerShell module wit
6561
>
6662
> The following connection commands have many of the same options available as described in [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell.md) and [Connect to Security & Compliance PowerShell](connect-to-scc-powershell.md). For example:
6763
>
68-
> - In Exchange Online PowerShell using the EXO V3 module, you can omit or include the _UseRPSSession_ switch to use REST API cmdlets or original remote PowerShell cmdlets. For more information, see [Updates for the EXO V3 module)](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module).
64+
> - You can use REST API cmdlets or original remote PowerShell cmdlets. For more information, see [Updates for the EXO V3 module)](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module).
6965
>
7066
> Remote PowerShell support in Exchange Online PowerShell will be deprecated. For more information, see [Announcing Deprecation of Remote PowerShell (RPS) Protocol in Exchange Online PowerShell](https://aka.ms/RPSDeprecation).
7167
>
@@ -75,10 +71,13 @@ The following examples show how to use the Exchange Online PowerShell module wit
7571
> - **Connect-ExchangeOnline in DoD**: `-ExchangeEnvironmentName O365USGovDoD`.
7672
> - **Connect-IPPSSession in DoD**: `-ConnectionUri https://l5.ps.compliance.protection.office365.us/powershell-liveid/ -AzureADAuthorizationEndpointUri https://login.microsoftonline.us/common`.
7773
>
78-
> - If a **Connect-IPPSSession** command present a login prompt, run the command: `$Global:IsWindows = $true` before the **Connect-IPPSSession** command.
74+
> - If a **Connect-IPPSSession** command presents a login prompt, run the command: `$Global:IsWindows = $true` before the **Connect-IPPSSession** command.
7975
8076
- **Connect using a certificate thumbprint**:
8177

78+
> [!NOTE]
79+
> The CertificateThumbprint parameter is supported only in Microsoft Windows.
80+
8281
The certificate needs to be installed on the computer where you're running the command. The certificate should be installed in the user certificate store.
8382

8483
- <u>Exchange Online PowerShell</u>:
@@ -166,7 +165,7 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
166165
167166
![Screenshot that shows App registrations in the Search results on the home page of the Azure portal.](media/exo-app-only-auth-find-app-registrations.png)
168167
169-
Or, to go directly to the **App registrations** page, use <https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps>.
168+
Or, to go directly to the **App registrations** page, use <https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade>.
170169
171170
3. On the **App registrations** page, click **New registration**.
172171
@@ -219,6 +218,23 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
219218
],
220219
```
221220

221+
> [!NOTE]
222+
> Microsoft 365 GCC High or DoD environments have access to Security & Compliance PowerShell only. Use the following values for `resourceAppId`, `resourceAccess id`, and `resourceAccess type`:
223+
>
224+
> ```json
225+
> "requiredResourceAccess": [
226+
> {
227+
> "resourceAppId": "00000007-0000-0ff1-ce00-000000000000",
228+
> "resourceAccess": [
229+
> {
230+
> "id": "455e5cd2-84e8-4751-8344-5672145dfa17",
231+
> "type": "Role"
232+
> }
233+
> ]
234+
> }
235+
> ],
236+
> ```
237+
222238
When you're finished, click **Save**.
223239
224240
3. Still on the **Manifest** page, under **Management**, select **API permissions**.
@@ -314,7 +330,7 @@ For more information about the URL syntax, see [Request the permissions from a d
314330
You have two options:
315331

316332
- **Assign Azure AD roles to the application**: This method is supported in Exchange Online PowerShell and Security & Compliance PowerShell.
317-
- **Assign custom Exchange Online role groups to the application**: Currently, this method is supported only in Exchange Online PowerShell, and only when you connect in [REST API mode](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module) (don't use the _UseRPSSession_ switch in the **Connect-ExchangeOnline** command).
333+
- **Assign custom Exchange Online role groups to the application using service principals**: This method is supported only when you connect in [REST API mode](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module).
318334

319335
> [!NOTE]
320336
> You can also combine both methods to assign permissions. For example, you can use Azure AD roles for the "Exchange Recipient Administrator" role and also assign your custom RBAC role to extend the permissions.
@@ -390,14 +406,16 @@ For general instructions about assigning roles in Azure AD, see [View and assign
390406

391407
![The role assignments page after to added the app to the role for Security & Compliance PowerShell.](media/exo-app-only-auth-app-assigned-to-role-scc.png)
392408

393-
#### Assign custom Exchange Online role groups to the application
409+
#### Assign custom Exchange Online role groups to the application using service principals
394410

395411
> [!NOTE]
396-
> Remember, this method is supported only in Exchange Online PowerShell, and only when you connect in [REST API mode](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module) (don't use the _UseRPSSession_ switch in the **Connect-ExchangeOnline** command).
412+
> You need to connect to Exchange Online PowerShell or Security & Compliance PowerShell _before_ completing steps to create a new service principal. Creating a new service principal without connecting to PowerShell won't work (your Azure App ID and Object ID is needed to create the new service principal).
413+
>
414+
> This method is supported only when you connect in [REST API mode](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module).
397415
398416
For information about creating custom role groups, see [Create role groups](/exchange/permissions-exo/role-groups#create-role-groups). The custom role group that you assign to the application can contain any combination of built-in and custom roles.
399417

400-
To assign custom Exchange Online role groups to the application, do the following steps:
418+
To assign custom role groups to the application using service principals, do the following steps:
401419

402420
1. In [Azure Active Directory PowerShell for Graph](/powershell/azure/active-directory/install-adv2), run the following command to store the details of the Azure application that you registered in [Step 1](#step-1-register-the-application-in-azure-ad) in a variable:
403421

@@ -413,8 +431,8 @@ To assign custom Exchange Online role groups to the application, do the followin
413431

414432
For detailed syntax and parameter information, see [Get-AzureADServicePrincipal](/powershell/module/azuread/get-azureadserviceprincipal).
415433

416-
2. In the same PowerShell window, connect to [Exchange Online PowerShell](connect-to-exchange-online-powershell.md) and run the following commands to:
417-
- Create an Exchange Online service principal object for the Azure application.
434+
2. In the same PowerShell window, connect to [Exchange Online PowerShell](connect-to-exchange-online-powershell.md) or [Security & Compliance PowerShell](connect-to-scc-powershell.md) and run the following commands to:
435+
- Create a service principal object for the Azure application.
418436
- Store the details of the service principal in a variable.
419437

420438
```powershell
@@ -433,7 +451,7 @@ To assign custom Exchange Online role groups to the application, do the followin
433451

434452
For detailed syntax and parameter information, see [New-ServicePrincipal](/powershell/module/exchange/new-serviceprincipal).
435453

436-
3. In Exchange Online PowerShell, run the following command to add the service principal as a member of the custom role group:
454+
3. In Exchange Online PowerShell or Security & Compliance PowerShell, run the following command to add the service principal as a member of the custom role group:
437455

438456
```powershell
439457
Add-RoleGroupMember -Identity "<CustomRoleGroupName>" -Member <$<VariableName2>.Identity | $<VariableName2>.ServiceId | $<VariableName2>.Id>

exchange/docs-conceptual/connect-exo-powershell-managed-identity.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Use Azure managed identities to connect to Exchange Online PowerShell
33
ms.author: chrisda
44
author: chrisda
55
manager: dansimp
6-
ms.date:
6+
ms.date: 5/10/2023
77
ms.audience: Admin
88
audience: Admin
99
ms.topic: article
@@ -242,6 +242,9 @@ For detailed syntax and parameter information, see [Get-AzADServicePrincipal](/p
242242

243243
#### Add the Exchange Online PowerShell module to Azure Automation accounts with system-assigned managed identities
244244

245+
> [!TIP]
246+
> If the following procedure in the Azure portal doesn't work for you, try the **New-AzAutomationModule** command in Azure PowerShell that's described after the Azure portal procedure.
247+
245248
1. On the **Automation accounts** page at <https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Automation%2FAutomationAccounts>, select the Automation account.
246249
2. In the details flyout that opens, start typing "Modules" in the ![Search icon.](media/search-icon.png) **Search** box, and then select **Modules** from results.
247250
3. On the **Modules** flyout that opens, click ![Add module icon.](media/add-icon.png) **Add a module**.
@@ -261,17 +264,18 @@ For detailed syntax and parameter information, see [Get-AzADServicePrincipal](/p
261264
To add the module to the Automation account in Azure PowerShell, use the following syntax:
262265

263266
```powershell
264-
New-AzAutomationModule -ResourceGroupName "<ResourceGroupName>" -AutomationAccountName "<AutomationAccountName>" -Name ExchangeOnlineManagement -ContentLinkUri https://www.powershellgallery.com/packages/ExchangeOnlineManagement/3.0.0
267+
New-AzAutomationModule -ResourceGroupName "<ResourceGroupName>" -AutomationAccountName "<AutomationAccountName>" -Name ExchangeOnlineManagement -ContentLinkUri https://www.powershellgallery.com/packages/ExchangeOnlineManagement/<LatestModuleVersion>
265268
```
266269

267270
- \<ResourceGroupName\> is the name of the resource group that's already assigned to the Automation account.
268271
- \<AutomationAccountName\> is the name of the Automation account.
272+
- \<LatestModuleVersion\> is the current version of the ExchangeOnlineManagement module. To see the latest GA (non-Preview) version of the module, run the following command in Windows PowerShell: `Find-Module ExchangeOnlineManagement`. To see the latest Preview release, run the following command: `Find-Module ExchangeOnlineManagement -AllowPrerelease`.
269273
- Currently, the PowerShell procedures don't give you a choice for the runtime version (it's 5.1).
270274

271275
For example:
272276

273277
```powershell
274-
New-AzAutomationModule -ResourceGroupName "ContosoRG" -AutomationAccountName "ContosoAzAuto1" -Name ExchangeOnlineManagement -ContentLinkUri https://www.powershellgallery.com/packages/ExchangeOnlineManagement/3.0.0
278+
New-AzAutomationModule -ResourceGroupName "ContosoRG" -AutomationAccountName "ContosoAzAuto1" -Name ExchangeOnlineManagement -ContentLinkUri https://www.powershellgallery.com/packages/ExchangeOnlineManagement/3.1.0
275279
```
276280

277281
To verify that the module imported successfully, run the following command:
@@ -375,7 +379,7 @@ To assign a role to the managed identity in Microsoft Graph PowerShell, do the f
375379

376380
```powershell
377381
$RoleID = (Get-MgRoleManagementDirectoryRoleDefinition -Filter "DisplayName eq '<Role Name>'").Id
378-
382+
379383
New-MgRoleManagementDirectoryRoleAssignment -PrincipalId $MI_ID -RoleDefinitionId $RoleID -DirectoryScopeId "/"
380384
```
381385

@@ -386,7 +390,7 @@ To assign a role to the managed identity in Microsoft Graph PowerShell, do the f
386390

387391
```powershell
388392
$RoleID = (Get-MgRoleManagementDirectoryRoleDefinition -Filter "DisplayName eq 'Exchange Administrator'").Id
389-
393+
390394
New-MgRoleManagementDirectoryRoleAssignment -PrincipalId $MI_ID -RoleDefinitionId $RoleID -DirectoryScopeId "/"
391395
```
392396

exchange/docs-conceptual/connect-to-exchange-online-powershell.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To connect to Exchange Online PowerShell from C#, see [Use C# to connect to Exch
3434
- The requirements for installing and using the module are described in [Install and maintain the Exchange Online PowerShell module](exchange-online-powershell-v2.md#install-and-maintain-the-exchange-online-powershell-module).
3535

3636
> [!NOTE]
37-
> If you're using the EXO V3 module (v3.0.0 or later) and you don't use the _UseRPSSession_ switch in the **Connect-ExchangeOnline** command, you'll have access to REST API cmdlets _only_. For more information, see [Updates for the EXO V3 module)](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module).
37+
> If you're using the EXO V3 module (v3.0.0 or later) and you don't use the _UseRPSSession_ switch in the **Connect-ExchangeOnline** command, you have access to REST API cmdlets _only_. For more information, see [Updates for the EXO V3 module)](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module).
3838
>
3939
> Remote PowerShell support in Exchange Online PowerShell will be deprecated. For more information, see [Announcing Deprecation of Remote PowerShell (RPS) Protocol in Exchange Online PowerShell](https://aka.ms/RPSDeprecation).
4040
@@ -69,8 +69,6 @@ Connect-ExchangeOnline -UserPrincipalName <UPN> [-UseRPSSession] [-ExchangeEnvir
6969

7070
For detailed syntax and parameter information, see [Connect-ExchangeOnline](/powershell/module/exchange/connect-exchangeonline).
7171

72-
**Notes**:
73-
7472
- _\<UPN\>_ is your account in user principal name format (for example, `[email protected]`).
7573

7674
- With the EXO V3 module (v3.0.0 or later), if you don't use the _UseRPSSession_ switch, you're using REST API cmdlets only. For more information, see [Updates for the EXO V3 module)](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module).
@@ -165,7 +163,7 @@ The connection examples in the following sections use modern authentication, and
165163
2. On any other device with a web browser and internet access, open <https://microsoft.com/devicelogin> and enter the \<XXXXXXXXX\> code value from the previous step.
166164
167165
3. Enter your credentials on the resulting pages.
168-
166+
169167
4. In the confirmation prompt, click **Continue**. The next message should indicate success, and you can close the browser or tab.
170168
171169
5. The command from step 1 continues to connect you to Exchange Online PowerShell.
@@ -209,7 +207,7 @@ For more information, see [Use Azure managed identities to connect to Exchange O
209207

210208
## Step 3: Disconnect when you're finished
211209

212-
Be sure to disconnect the session when you're finished. If you close the PowerShell window without disconnecting the session, you could use up all the sessions available to you, and you'll need to wait for the sessions to expire. To disconnect the session, run the following command.
210+
Be sure to disconnect the session when you're finished. If you close the PowerShell window without disconnecting the session, you could use up all the sessions available to you, and you need to wait for the sessions to expire. To disconnect the session, run the following command:
213211

214212
```powershell
215213
Disconnect-ExchangeOnline
@@ -240,6 +238,18 @@ If you receive errors, check the following requirements:
240238

241239
- If your organization uses federated authentication, and your identity provider (IDP) and/or security token service (STS) isn't publicly available, you can't use a federated account to connect to Exchange Online PowerShell. Instead, create and use a non-federated account in Microsoft 365 to connect to Exchange Online PowerShell.
242240

241+
- REST-based connections to Exchange Online PowerShell require the PowerShellGet module, and by dependency, the PackageManagement module, so you'll receive errors if you try to connect without having them installed. For example, you might see the following error:
242+
243+
> The term 'Update-ModuleManifest' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
244+
245+
For more information about the PowerShellGet and PackageManagement module requirements, see [PowerShellGet for REST-based connections in Windows](exchange-online-powershell-v2.md#powershellget-for-rest-based-connections-in-windows).
246+
247+
- After you connect, you might received an error that looks like this:
248+
249+
> Could not load file or assembly 'System.IdentityModel.Tokens.Jwt,Version=\<Version\>, Culture=neutral, PublicKeyToken=\<TokenValue\>'. Could not find or load a specific file.
250+
251+
This error happens when the Exchange Online PowerShell module conflicts with another module that's imported into the runspace. Try connecting in a new Windows PowerShell window before importing other modules.
252+
243253
## Appendix: Comparison of old and new connection methods
244254

245255
This section attempts to compare older connection methods that have been replaced by the Exchange Online PowerShell module. The Basic authentication and OAuth token procedures are included for historical reference only and are no longer supported.
@@ -400,6 +410,9 @@ This section attempts to compare older connection methods that have been replace
400410

401411
- **Certificate thumbprint**:
402412

413+
> [!NOTE]
414+
> The CertificateThumbprint parameter is supported only in Microsoft Windows.
415+
403416
```powershell
404417
Connect-ExchangeOnline -CertificateThumbPrint "012THISISADEMOTHUMBPRINT" -AppID "36ee4c6c-0812-40a2-b820-b22ebd02bce3" -Organization "contoso.onmicrosoft.com"
405418
```

0 commit comments

Comments
 (0)