Skip to content

Commit 46a233a

Browse files
committed
Merge branch 'main' into QuarDLP-chrisda
2 parents 2ad7965 + 42de48c commit 46a233a

File tree

421 files changed

+8306
-3200
lines changed

Some content is hidden

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

421 files changed

+8306
-3200
lines changed

.openpublishing.redirection.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
},
313313
{
314314
"source_path": "exchange/virtual-folder/exchange/advanced-threat-protection/Get-PhishFilterPolicy.md",
315-
"redirect_url": "/powershell/module/exchange/get-tenantallowblocklistppoofitems",
315+
"redirect_url": "/powershell/module/exchange/get-tenantallowblocklistspoofitems",
316316
"redirect_document_id": false
317317
},
318318
{
@@ -422,7 +422,7 @@
422422
},
423423
{
424424
"source_path": "exchange/virtual-folder/exchange/advanced-threat-protection/Set-PhishFilterPolicy.md",
425-
"redirect_url": "/powershell/module/exchange/set-tenantallowblocklistppoofitems",
425+
"redirect_url": "/powershell/module/exchange/set-tenantallowblocklistspoofitems",
426426
"redirect_document_id": false
427427
},
428428
{
@@ -6547,8 +6547,8 @@
65476547
},
65486548
{
65496549
"source_path": "exchange/docs-conceptual/exchange-server/use-update-exchangehelp.md",
6550-
"redirect_url": "/powershell/exchange/use-update-exchangehelp",
6551-
"redirect_document_id": true
6550+
"redirect_url": "/powershell/exchange/exchange-management-shell",
6551+
"redirect_document_id": false
65526552
},
65536553
{
65546554
"source_path": "exchange/docs-conceptual/exchange-server/recipient-filters/filter-properties.md",
@@ -6847,12 +6847,12 @@
68476847
},
68486848
{
68496849
"source_path": "exchange/virtual-folder/exchange/Get-PhishFilterPolicy.md",
6850-
"redirect_url": "/powershell/module/exchange/get-tenantallowblocklistppoofitems",
6850+
"redirect_url": "/powershell/module/exchange/get-tenantallowblocklistspoofitems",
68516851
"redirect_document_id": false
68526852
},
68536853
{
68546854
"source_path": "exchange/virtual-folder/exchange/Set-PhishFilterPolicy.md",
6855-
"redirect_url": "/powershell/module/exchange/set-tenantallowblocklistppoofitems",
6855+
"redirect_url": "/powershell/module/exchange/set-tenantallowblocklistspoofitems",
68566856
"redirect_document_id": false
68576857
},
68586858
{
@@ -6924,6 +6924,16 @@
69246924
"source_path": "teams/teams-ps/teams/New-CsTeamsShiftsConnectionTeamMap.yml",
69256925
"redirect_url": "https://review.learn.microsoft.com/en-us/powershell/module/teams/",
69266926
"redirect_document_id": false
6927+
},
6928+
{
6929+
"source_path": "exchange/docs-conceptual/use-update-exchangehelp.md",
6930+
"redirect_url": "/powershell/exchange/exchange-management-shell",
6931+
"redirect_document_id": false
6932+
},
6933+
{
6934+
"source_path": "exchange/docs-conceptual/v1-module-mfa-connect-to-scc-powershell.md",
6935+
"redirect_url": "/powershell/exchange/connect-to-scc-powershell",
6936+
"redirect_document_id": false
69276937
}
69286938
]
69296939
}

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

Lines changed: 134 additions & 62 deletions
Large diffs are not rendered by default.

exchange/docs-conceptual/cmdlet-property-sets.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Property sets in Exchange Online PowerShell module cmdlets
33
ms.author: chrisda
44
author: chrisda
55
manager: dansimp
6-
ms.date:
6+
ms.date: 9/1/2023
77
ms.audience: Admin
88
audience: Admin
99
ms.topic: article
@@ -23,8 +23,8 @@ This article describes the property sets that are available in the nine exclusiv
2323

2424
For more information about filtering with cmdlets in the module, see [Filters in the Exchange Online PowerShell module](filters-v2.md).
2525

26-
> [!NOTE]
27-
> Version 2.0.5 and earlier is known as the Exchange Online PowerShell V2 module (abbreviated as the EXO V2 module). Version 3.0.0 and later is known as the Exchange Online PowerShell V3 module (abbreviated as the EXO V3 module).
26+
> [!TIP]
27+
> Version 3.0.0 and later (2022) is known as the Exchange Online PowerShell V3 module (abbreviated as the EXO V3 module). Version 2.0.5 and earlier (2021) was known as the Exchange Online PowerShell V2 module (abbreviated as the EXO V2 module).
2828
2929
## Get-EXOCasMailbox property sets
3030

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

Lines changed: 51 additions & 17 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/21/2023
6+
ms.date: 8/24/2023
77
ms.audience: Admin
88
audience: Admin
99
ms.topic: article
@@ -19,7 +19,7 @@ description: "Learn about using the Exchange Online PowerShell V3 module and Azu
1919

2020
# Use Azure managed identities to connect to Exchange Online PowerShell
2121

22-
Using the [Exchange Online PowerShell V3 module](exchange-online-powershell-v2.md#updates-for-the-exo-v3-module), you can connect to Exchange Online PowerShell using a user-assigned or system assigned Azure managed identity. For more information about managed identities, see [What are managed identities for Azure resources?](/azure/active-directory/managed-identities-azure-resources/overview).
22+
Using the [Exchange Online PowerShell V3 module](exchange-online-powershell-v2.md#rest-api-connections-in-the-exo-v3-module), you can connect to Exchange Online PowerShell using a user-assigned or system assigned Azure managed identity. For more information about managed identities, see [What are managed identities for Azure resources?](/azure/active-directory/managed-identities-azure-resources/overview).
2323

2424
Unlike other connection methods using the Exchange Online PowerShell module, you can't run the connection commands in a Windows PowerShell session on your local computer. Instead, you connect in the context of the Azure resource that's associated with the managed identity (for example, an Azure automation account or an Azure Virtual Machine).
2525

@@ -34,6 +34,8 @@ The rest of this article explains how to connect using managed identity, and the
3434
> - [Add-UnifiedGroupLinks](/powershell/module/exchange/add-unifiedgrouplinks)
3535
>
3636
> 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).
37+
>
38+
> REST API connections in the V3 module require the PowerShellGet and PackageManagement modules. For more information, see [PowerShellGet for REST-based connections in Windows](exchange-online-powershell-v2.md#powershellget-for-rest-based-connections-in-windows).
3739
3840
## Connect to Exchange Online PowerShell using system-assigned managed identity
3941

@@ -77,7 +79,7 @@ After you've successfully created, saved, and published the PowerShell runbook,
7779
1. On the **Automation accounts** page at <https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Automation%2FAutomationAccounts>, select the Automation account.
7880
2. In the details flyout that opens, start typing "Runbooks" in the ![Search icon.](media/search-icon.png) **Search** box, and then select **Runbooks** from results.
7981
3. On the **Runbooks** flyout that opens, select the runbook.
80-
4. On the details page of the runbook, click **Start**.
82+
4. On the details page of the runbook, select **Start**.
8183

8284
### Connect to Exchange Online PowerShell using Azure VMs with system-assigned managed identity
8385

@@ -127,7 +129,7 @@ After you've successfully created the PowerShell runbook, do the following steps
127129
1. On the **Automation accounts** page at <https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Automation%2FAutomationAccounts>, select the Automation account.
128130
2. In the details flyout that opens, start typing "Runbooks" in the ![Search icon.](media/search-icon.png) **Search** box, and then select **Runbooks** from results.
129131
3. On the **Runbooks** flyout that opens, select the runbook.
130-
4. On the details page of the runbook, click **Start**.
132+
4. On the details page of the runbook, select **Start**.
131133

132134
### Connect to Exchange Online PowerShell using Azure VMs with system-assigned managed identities
133135

@@ -235,7 +237,7 @@ $MI_ID = (Get-AzADServicePrincipal -DisplayName "ContosoAzAuto1").Id
235237

236238
To verify that the variable was captured successfully, run the command `$MI_ID`. The output should be a GUID value (for example, 9f164909-3007-466e-a1fe-28d20b16e2c2).
237239

238-
For detailed syntax and parameter information, see [Get-AzADServicePrincipal](/powershell/module/az.automation/get-azadserviceprincipal).
240+
For detailed syntax and parameter information, see [Get-AzADServicePrincipal](/powershell/module/az.resources/get-azadserviceprincipal).
239241

240242
### Step 3: Add the Exchange Online PowerShell module to the managed identity
241243

@@ -246,15 +248,15 @@ For detailed syntax and parameter information, see [Get-AzADServicePrincipal](/p
246248
247249
1. On the **Automation accounts** page at <https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Automation%2FAutomationAccounts>, select the Automation account.
248250
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.
249-
3. On the **Modules** flyout that opens, click ![Add module icon.](media/add-icon.png) **Add a module**.
251+
3. On the **Modules** flyout that opens, select ![Add module icon.](media/add-icon.png) **Add a module**.
250252
4. On the **Add a module** page that opens, configure the following settings:
251253
- **Upload a module file**: Select **Browse from gallery**.
252254
- **PowerShell module file**: Select **Click here to browse from gallery**:
253255
1. In the **Browse Gallery** page that opens, start typing "ExchangeOnlineManagement" in the ![Search icon.](media/search-icon.png) **Search** box, press Enter, and then select **ExchangeOnlineManagement** from the results.
254-
2. On the details page that opens, click **Select** to return to the **Add a module** page.
256+
2. On the details page that opens, select **Select** to return to the **Add a module** page.
255257
- **Runtime version**: Select **5.1** or **7.1 (Preview)**. To add both versions, repeat the steps in this section to add and select the other runtime version for the module.
256258

257-
When you're finished, click **Import**.
259+
When you're finished, select **Import**.
258260

259261
![Screenshot of adding a module to an Automation account in the Azure portal.](media/mi-add-exo-module.png)
260262

@@ -301,7 +303,15 @@ The procedures in this step require the Microsoft Graph PowerShell SDK. For inst
301303
Connect-MgGraph -Scopes AppRoleAssignment.ReadWrite.All,Application.Read.All
302304
```
303305

304-
2. If a **Permissions requested** dialog opens, select **Consent on behalf of your organization**, and then click **Accept**.
306+
If a **Permissions requested** dialog opens, select **Consent on behalf of your organization**, and then click **Accept**.
307+
308+
2. Run the following command to verify that the Office 365 Exchange Online resource is available in Azure AD:
309+
310+
```powershell
311+
Get-MgServicePrincipal -Filter "AppId eq '00000002-0000-0ff1-ce00-000000000000'"
312+
```
313+
314+
If the command returns no results, the next step won't work. See the subsection at the end of this section to fix the issue before you continue.
305315

306316
3. Run the following commands to grant the Exchange.ManageAsApp API permission for the managed identity to call Exchange Online:
307317

@@ -315,13 +325,37 @@ The procedures in this step require the Microsoft Graph PowerShell SDK. For inst
315325

316326
- `$MI_ID` is the Id (GUID) value of the managed identity that you stored in a variable in [Step 2](#step-2-store-the-system-assigned-managed-identity-in-a-variable).
317327
- `$AppRoleID` is the Id (GUID) value of the **Exchange.ManageAsApp** API permission that's the same in every organization.
318-
- `$ResourceID` is the Id (GUID) value of the **Office 365 Exchange Online** resource in Azure Active Directory. The Id value is different in every organization.
328+
- `$ResourceID` is the Id (GUID) value of the **Office 365 Exchange Online** resource in Azure AD. The AppId value is the same in every organization, but the Id value is different in every organization.
319329

320330
For detailed syntax and parameter information, see the following articles:
321331

322-
- [Connect-MgGraph](/powershell/module/microsoft.graph.applications/new-mgserviceprincipalapproleassignment).
332+
- [Connect-MgGraph](/powershell/module/microsoft.graph.applications/new-mgserviceprincipalapproleassignment)
333+
- [Get-MgServicePrincipal](/powershell/module/microsoft.graph.applications/get-mgserviceprincipal)
323334
- [New-MgServicePrincipalAppRoleAssignment](/powershell/module/microsoft.graph.applications/new-mgserviceprincipalapproleassignment)
324335

336+
#### What to do if the Office 365 Exchange Online resource is not available in Azure AD
337+
338+
If the following command returns no results:
339+
340+
```powershell
341+
Get-MgServicePrincipal -Filter "AppId eq '00000002-0000-0ff1-ce00-000000000000'"
342+
```
343+
344+
Do the following steps:
345+
346+
1. Register an application in Azure AD as described in [Step 1: Register the application in Azure AD](app-only-auth-powershell-v2.md#step-1-register-the-application-in-azure-ad).
347+
2. Assign the Office 365 Exchange Online \> Exchange.ManageAsApp API permission to the application using the "Modify the app manifest" method as described in [Step 2: Assign API permissions to the application](app-only-auth-powershell-v2.md#step-2-assign-api-permissions-to-the-application).
348+
349+
After you do these steps, run the **Get-MgServicePrincipal** command again to confirm that the Office 365 Exchange Online resource is available in Azure AD.
350+
351+
For even more information, run the following command to verify that the Exchange.ManageAsApp API permission (`dc50a0fb-09a3-484d-be87-e023b12c6440`) is available in the Office 365 Exchange Online resource:
352+
353+
```powershell
354+
Get-MgServicePrincipal -Filter "AppId eq '00000002-0000-0ff1-ce00-000000000000'" | Select-Object -ExpandProperty AppRoles | Format-Table Value,Id
355+
```
356+
357+
Now that the Office 365 Exchange Online resource is available, return to Step 4.3 in this section.
358+
325359
### Step 5: Assign Azure AD roles to the managed identity
326360

327361
The supported Azure AD roles are described in the following list:
@@ -354,13 +388,13 @@ For general instructions about assigning roles in Azure AD, see [View and assign
354388

355389
![Find and select a supported Exchange Online PowerShell role by clicking on the role name.](media/exo-app-only-auth-find-and-select-supported-role.png)
356390

357-
3. On the **Assignments** page that opens, click **Add assignments**.
391+
3. On the **Assignments** page that opens, select **Add assignments**.
358392

359393
![Select Add assignments on the role assignments page for Exchange Online PowerShell.](media/exo-app-only-auth-role-assignments-click-add-assignments.png)
360394

361395
4. In the **Add assignments** flyout that opens, find and select the managed identity you created or identified in [Step 1](#step-1-create-a-resource-with-system-assigned-managed-identity).
362396

363-
When you're finished, click **Add**.
397+
When you're finished, select **Add**.
364398

365399
5. Back on the **Assignments** page, verify that the role has been assigned to the managed identity.
366400

@@ -372,9 +406,9 @@ To assign a role to the managed identity in Microsoft Graph PowerShell, do the f
372406
Connect-MgGraph -Scopes RoleManagement.ReadWrite.Directory
373407
```
374408

375-
2. If a **Permissions requested** dialog opens, select **Consent on behalf of your organization**, and then click **Accept**.
409+
If a **Permissions requested** dialog opens, select **Consent on behalf of your organization**, and then click **Accept**.
376410

377-
3. Use the following syntax to assign the required Azure AD role to the managed identity:
411+
2. Use the following syntax to assign the required Azure AD role to the managed identity:
378412

379413
```powershell
380414
$RoleID = (Get-MgRoleManagementDirectoryRoleDefinition -Filter "DisplayName eq '<Role Name>'").Id
@@ -396,7 +430,7 @@ To assign a role to the managed identity in Microsoft Graph PowerShell, do the f
396430
For detailed syntax and parameter information, see the following articles:
397431

398432
- [Connect-MgGraph](/powershell/module/microsoft.graph.applications/new-mgserviceprincipalapproleassignment).
399-
- [New-MgRoleManagementDirectoryRoleAssignment](/powershell/module/microsoft.graph.applications/new-mgrolemanagementdirectoryroleassignment)
433+
- [New-MgRoleManagementDirectoryRoleAssignment](/powershell/module/microsoft.graph.identity.governance/new-mgrolemanagementdirectoryroleassignment)
400434

401435
## Create and configure a user-assigned managed identity
402436

@@ -405,7 +439,7 @@ The steps are:
405439
1. [(Optional) Create a user-assigned managed identity](#step-1-create-a-user-assigned-managed-identity)
406440
2. [(Optional) Create a resource with user-assigned managed identity](#step-2-create-a-resource-with-user-assigned-managed-identity)
407441
3. [Store the user-assigned managed identity in a variable](#step-3-store-the-user-assigned-managed-identity-in-a-variable)
408-
4. [Grant the Exchange.ManageAsApp API permission for the managed identity to call Exchange Online](#step-4-grant-the-exchangemanageasapp-api-permission-for-the-managed-identity-to-call-exchange-online)
442+
4. [Add the Exchange Online PowerShell module to the managed identity](#step-4-add-the-exchange-online-powershell-module-to-the-managed-identity)
409443
5. [Grant the Exchange.ManageAsApp API permission for the managed identity to call Exchange Online](#step-5-grant-the-exchangemanageasapp-api-permission-for-the-managed-identity-to-call-exchange-online)
410444
6. [Assign Azure AD roles to the managed identity](#step-6-assign-azure-ad-roles-to-the-managed-identity)
411445

0 commit comments

Comments
 (0)