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
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/app-only-auth-powershell-v2.md
+21-19Lines changed: 21 additions & 19 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: App-only authentication in Exchange Online PowerShell and Security & Compliance PowerShell
3
3
ms.author: chrisda
4
4
author: chrisda
5
-
manager: dansimp
5
+
manager: deniseb
6
6
ms.date: 12/12/2023
7
7
ms.audience: Admin
8
8
audience: Admin
@@ -33,7 +33,7 @@ Certificate based authentication (CBA) or app-only authentication as described i
33
33
>
34
34
> For instructions on how to install or update the module, see [Install and maintain the Exchange Online PowerShell module](exchange-online-powershell-v2.md#install-and-maintain-the-exchange-online-powershell-module). For instructions on how to use the module in Azure automation, see [Manage modules in Azure Automation](/azure/automation/shared-resources/modules).
35
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).
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-api-connections-in-windows).
37
37
>
38
38
> 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`.
39
39
>
@@ -216,15 +216,15 @@ Choose **one** of the following methods in this section to assign API permission
216
216
217
217

218
218
219
-
5. On the **What type of permissions does your application require?** flyout that appears, select **Application permissions**.
219
+
4. On the **What type of permissions does your application require?** flyout that appears, select **Application permissions**.
220
220
221
-
6. In the permissions list that appears, expand **Exchange**, select **Exchange.ManageAsApp**, and then select **Add permissions**.
221
+
5. In the permissions list that appears, expand **Exchange**, select **Exchange.ManageAsApp**, and then select **Add permissions**.
222
222
223
223

224
224
225
-
7. Back on the app **API permissions** page, verify **Office 365 Exchange Online** \> **Exchange.ManageAsApp** is listed and contains the following values:
225
+
6. Back on the app **API permissions** page, verify **Office 365 Exchange Online** \> **Exchange.ManageAsApp** is listed and contains the following values:
226
226
- **Type**: **Application**.
227
-
- **Admin consent required**: **Yes**.
227
+
- **Admin consent required**: **Yes**.
228
228
229
229
- **Status**: The current incorrect value is **Not granted for \<Organization\>**.
230
230
@@ -236,11 +236,11 @@ Choose **one** of the following methods in this section to assign API permission
236
236
237
237

238
238
239
-
8. For the default **Microsoft Graph** \> **User.Read** entry, select **...** \> **Revoke admin consent**, and then select **Yes** in the confirmation dialog that opens to return **Status** back to the default blank value.
239
+
7. For the default **Microsoft Graph** \> **User.Read** entry, select **...** \> **Revoke admin consent**, and then select **Yes** in the confirmation dialog that opens to return **Status** back to the default blank value.
240
240
241
241

242
242
243
-
9. Close the current **API permissions** page (not the browser tab) to return to the **App registrations** page. You use the **App registrations** page in an upcoming step.
243
+
8. Close the current **API permissions** page (not the browser tab) to return to the **App registrations** page. You use the **App registrations** page in an upcoming step.
244
244
245
245
#### Modify the app manifest to assign API permissions
246
246
@@ -310,7 +310,7 @@ Choose **one** of the following methods in this section to assign API permission
310
310
311
311
4. On the **API permissions** page, verify **Office 365 Exchange Online** \> **Exchange.ManageAsApp** is listed and contains the following values:
312
312
- **Type**: **Application**.
313
-
- **Admin consent required**: **Yes**.
313
+
- **Admin consent required**: **Yes**.
314
314
315
315
- **Status**: The current incorrect value is **Not granted for \<Organization\>** for the **Office 365 Exchange Online** \> **Exchange.ManageAsApp** entry.
316
316
@@ -412,20 +412,22 @@ The supported Microsoft Entra roles are described in the following table:
> <sup>\*</sup> The Global Administrator and Exchange Administrator roles provide the required permissions for any task in Exchange Online PowerShell. For example:
424
-
>
425
-
> - Recipient management.
426
-
> - Security and protection features. For example, anti-spam, anti-malware, anti-phishing, and the associated reports.
427
-
>
428
-
> The Security Administrator role does not have the necessary permissions for those same tasks.
423
+
¹ The Global Administrator and Exchange Administrator roles provide the required permissions for any task in Exchange Online PowerShell. For example:
424
+
425
+
- Recipient management.
426
+
- Security and protection features. For example, anti-spam, anti-malware, anti-phishing, and the associated reports.
427
+
428
+
The Security Administrator role does not have the necessary permissions for those same tasks.
429
+
430
+
² Microsoft recommends that you use roles with the fewest permissions. Using lower permissioned accounts helps improve security for your organization. Global Administrator is a highly privileged role that should be limited to emergency scenarios when you can't use an existing role.
429
431
430
432
For general instructions about assigning roles in Microsoft Entra ID, see [Assign Microsoft Entra roles to users](/entra/identity/role-based-access-control/manage-roles-portal).
431
433
@@ -481,7 +483,7 @@ For general instructions about assigning roles in Microsoft Entra ID, see [Assig
481
483
>
482
484
> This method is supported only when you connect to Exchange Online PowerShell or Security & Compliance PowerShell in [REST API mode](exchange-online-powershell-v2.md#rest-api-connections-in-the-exo-v3-module). Security & Compliance PowerShell supports REST API mode in v3.2.0 or later.
483
485
484
-
For information about creating custom role groups, see [Create role groups in Exchange Online](/exchange/permissions-exo/role-groups#create-role-groups) and [Create Email & collaboration role groups in the Microsoft Defender portal](/microsoft-365/security/office-365-security/mdo-portal-permissions#create-email--collaboration-role-groups-in-the-microsoft-defender-portal). The custom role group that you assign to the application can contain any combination of built-in and custom roles.
486
+
For information about creating custom role groups, see [Create role groups in Exchange Online](/exchange/permissions-exo/role-groups#create-role-groups) and [Create Email & collaboration role groups in the Microsoft Defender portal](/defender-office-365/mdo-portal-permissions#create-email--collaboration-role-groups-in-the-microsoft-defender-portal). The custom role group that you assign to the application can contain any combination of built-in and custom roles.
485
487
486
488
To assign custom role groups to the application using service principals, do the following steps:
0 commit comments