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
> 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).
37
39
38
40
## Connect to Exchange Online PowerShell using system-assigned managed identity
39
41
@@ -77,7 +79,7 @@ After you've successfully created, saved, and published the PowerShell runbook,
77
79
1. On the **Automation accounts** page at <https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Automation%2FAutomationAccounts>, select the Automation account.
78
80
2. In the details flyout that opens, start typing "Runbooks" in the **Search** box, and then select **Runbooks** from results.
79
81
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**.
81
83
82
84
### Connect to Exchange Online PowerShell using Azure VMs with system-assigned managed identity
83
85
@@ -127,7 +129,7 @@ After you've successfully created the PowerShell runbook, do the following steps
127
129
1. On the **Automation accounts** page at <https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Automation%2FAutomationAccounts>, select the Automation account.
128
130
2. In the details flyout that opens, start typing "Runbooks" in the **Search** box, and then select **Runbooks** from results.
129
131
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**.
131
133
132
134
### Connect to Exchange Online PowerShell using Azure VMs with system-assigned managed identities
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).
237
239
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).
239
241
240
242
### Step 3: Add the Exchange Online PowerShell module to the managed identity
241
243
@@ -246,15 +248,15 @@ For detailed syntax and parameter information, see [Get-AzADServicePrincipal](/p
246
248
247
249
1. On the **Automation accounts** page at <https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Automation%2FAutomationAccounts>, select the Automation account.
248
250
2. In the details flyout that opens, start typing "Modules" in the **Search** box, and then select **Modules** from results.
249
-
3. On the **Modules** flyout that opens, click**Add a module**.
251
+
3. On the **Modules** flyout that opens, select**Add a module**.
250
252
4. On the **Add a module** page that opens, configure the following settings:
251
253
-**Upload a module file**: Select **Browse from gallery**.
252
254
-**PowerShell module file**: Select **Click here to browse from gallery**:
253
255
1. In the **Browse Gallery** page that opens, start typing "ExchangeOnlineManagement" in the **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.
255
257
-**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.
256
258
257
-
When you're finished, click**Import**.
259
+
When you're finished, select**Import**.
258
260
259
261

260
262
@@ -301,7 +303,15 @@ The procedures in this step require the Microsoft Graph PowerShell SDK. For inst
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.
305
315
306
316
3. Run the following commands to grant the Exchange.ManageAsApp API permission for the managed identity to call Exchange Online:
307
317
@@ -315,13 +325,37 @@ The procedures in this step require the Microsoft Graph PowerShell SDK. For inst
315
325
316
326
-`$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).
317
327
-`$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.
319
329
320
330
For detailed syntax and parameter information, see the following articles:
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:
Now that the Office 365 Exchange Online resource is available, return to Step 4.3 in this section.
358
+
325
359
### Step 5: Assign Azure AD roles to the managed identity
326
360
327
361
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
354
388
355
389

356
390
357
-
3. On the **Assignments** page that opens, click**Add assignments**.
391
+
3. On the **Assignments** page that opens, select**Add assignments**.
358
392
359
393

360
394
361
395
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).
362
396
363
-
When you're finished, click**Add**.
397
+
When you're finished, select**Add**.
364
398
365
399
5. Back on the **Assignments** page, verify that the role has been assigned to the managed identity.
366
400
@@ -372,9 +406,9 @@ To assign a role to the managed identity in Microsoft Graph PowerShell, do the f
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/connect-to-exchange-online-powershell.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Connect to Exchange Online PowerShell
3
3
author: chrisda
4
4
manager: dansimp
5
-
ms.date: 7/20/2023
5
+
ms.date: 8/21/2023
6
6
ms.audience: Admin
7
7
audience: Admin
8
8
ms.topic: article
@@ -13,7 +13,7 @@ ms.collection: Strat_EX_Admin
13
13
ms.custom:
14
14
ms.assetid:
15
15
search.appverid: MET150
16
-
description: "Learn how to use the Exchange Online PowerShell V2 module or V3 module to connect to Exchange Online PowerShell with modern authentication and/or multi-factor authentication (MFA)."
16
+
description: "Learn how to use the Exchange Online PowerShell V3 module to connect to Exchange Online PowerShell with modern authentication and/or multi-factor authentication (MFA)."
17
17
---
18
18
19
19
# Connect to Exchange Online PowerShell
@@ -22,9 +22,6 @@ This article contains instructions for how to connect to Exchange Online PowerSh
22
22
23
23
The Exchange Online PowerShell module uses modern authentication for connecting to all Exchange-related PowerShell environments in Microsoft 365: Exchange Online PowerShell, Security & Compliance PowerShell, and standalone Exchange Online Protection (EOP) PowerShell. For more information about the Exchange Online PowerShell module, see [About the Exchange Online PowerShell module](exchange-online-powershell-v2.md).
24
24
25
-
> [!NOTE]
26
-
> 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).
27
-
28
25
To connect to Exchange Online PowerShell for automation, see [App-only authentication for unattended scripts](app-only-auth-powershell-v2.md) and [Use Azure managed identities to connect to Exchange Online PowerShell](connect-exo-powershell-managed-identity.md).
29
26
30
27
To connect to Exchange Online PowerShell from C#, see [Use C# to connect to Exchange Online PowerShell](connect-to-exo-powershell-c-sharp.md).
@@ -35,6 +32,8 @@ To connect to Exchange Online PowerShell from C#, see [Use C# to connect to Exch
35
32
36
33
> [!NOTE]
37
34
> Remote PowerShell connections are deprecated in Exchange Online PowerShell. For more information, see [Deprecation of Remote PowerShell in Exchange Online](https://techcommunity.microsoft.com/t5/exchange-team-blog/deprecation-of-remote-powershell-in-exchange-online-re-enabling/ba-p/3779692).
35
+
>
36
+
> REST API connections in the Exchange Online PowerShell 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).
38
37
39
38
- After you connect, the cmdlets and parameters that you have or don't have access to is controlled by role-based access control (RBAC). For more information, see [Permissions in Exchange Online](/exchange/permissions-exo/permissions-exo).
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/connect-to-exchange-online-protection-powershell.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Connect to Exchange Online Protection PowerShell
3
3
author: chrisda
4
4
manager: dansimp
5
-
ms.date: 7/20/2023
5
+
ms.date: 8/21/2023
6
6
ms.audience: Admin
7
7
audience: Admin
8
8
ms.topic: article
@@ -13,7 +13,7 @@ ms.collection: Strat_EX_Admin
13
13
ms.custom:
14
14
ms.assetid:
15
15
search.appverid: MET150
16
-
description: "Learn how to use the Exchange Online PowerShell V2 module or V3 module to connect to standalone Exchange Online Protection PowerShell with modern authentication and/or multi-factor authentication (MFA)."
16
+
description: "Learn how to use the Exchange Online PowerShell V3 module to connect to standalone Exchange Online Protection PowerShell with modern authentication and/or multi-factor authentication (MFA)."
17
17
---
18
18
19
19
# Connect to Exchange Online Protection PowerShell
@@ -25,11 +25,11 @@ The Exchange Online PowerShell module uses modern authentication for connecting
25
25
For more information about Exchange Online Protection PowerShell, see [Exchange Online Protection PowerShell](exchange-online-protection-powershell.md).
26
26
27
27
> [!NOTE]
28
-
> 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).
29
-
>
30
28
> As of June 2020, the instructions for connecting to standalone Exchange Online Protection PowerShell and Exchange Online PowerShell are basically the same. If you use the **Connect-IPPSSession** cmdlet with the _ConnectionUri_ parameter value `https://ps.protection.outlook.com/powershell-liveid/`, you're redirected to the same `https://outlook.office365.com/powershell-liveid/` endpoint that's used by **Connect-ExchangeOnline** for Exchange Online PowerShell connections.
31
29
>
32
30
> Remote PowerShell connections in Exchange Online PowerShell are deprecated. For more information, see [Deprecation of Remote PowerShell in Exchange Online](https://techcommunity.microsoft.com/t5/exchange-team-blog/deprecation-of-remote-powershell-in-exchange-online-re-enabling/ba-p/3779692).
31
+
>
32
+
> REST API connections in the Exchange Online PowerShell 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).
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/connect-to-exo-powershell-c-sharp.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Use C# to connect to Exchange Online PowerShell
3
3
ms.author: chrisda
4
4
author: chrisda
5
5
manager: dansimp
6
-
ms.date:
6
+
ms.date:8/21/2023
7
7
ms.audience: Admin
8
8
audience: Admin
9
9
ms.topic: article
@@ -23,6 +23,11 @@ The code samples in this article use the [Exchange Online PowerShell V3 module](
23
23
24
24
To install the Exchange Online PowerShell module, see [Install and maintain the Exchange Online PowerShell module](exchange-online-powershell-v2.md#install-and-maintain-the-exchange-online-powershell-module).
25
25
26
+
> [!TIP]
27
+
> REST API connections in the Exchange Online PowerShell 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).
28
+
>
29
+
> If you get errors when you try to connect, use the _SkipLoadingFormatData_ switch on the **Connect-ExchangeOnline** cmdlet.
30
+
26
31
## Sample 1: Create a single connection using a PowerShell runspace
0 commit comments