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
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: App-only authentication in Exchange Online PowerShell and Security & Comp
3
3
ms.author: chrisda
4
4
author: chrisda
5
5
manager: dansimp
6
-
ms.date: 01/31/2023
6
+
ms.date: 4/20/2023
7
7
ms.audience: Admin
8
8
audience: Admin
9
9
ms.topic: article
@@ -408,11 +408,13 @@ For general instructions about assigning roles in Azure AD, see [View and assign
408
408
#### Assign custom Exchange Online role groups to the application using service principals
409
409
410
410
> [!NOTE]
411
-
> 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).
411
+
> 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).
412
+
>
413
+
> 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
414
413
415
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.
414
416
415
-
To assign custom Exchange Online role groups to the application using service principals, do the following steps:
417
+
To assign custom role groups to the application using service principals, do the following steps:
416
418
417
419
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:
418
420
@@ -428,8 +430,8 @@ To assign custom Exchange Online role groups to the application using service pr
428
430
429
431
For detailed syntax and parameter information, see [Get-AzureADServicePrincipal](/powershell/module/azuread/get-azureadserviceprincipal).
430
432
431
-
2. In the same PowerShell window, connect to [Exchange Online PowerShell](connect-to-exchange-online-powershell.md) and run the following commands to:
432
-
- Create an Exchange Online service principal object for the Azure application.
433
+
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:
434
+
- Create a service principal object for the Azure application.
433
435
- Store the details of the service principal in a variable.
434
436
435
437
```powershell
@@ -448,7 +450,7 @@ To assign custom Exchange Online role groups to the application using service pr
448
450
449
451
For detailed syntax and parameter information, see [New-ServicePrincipal](/powershell/module/exchange/new-serviceprincipal).
450
452
451
-
3. In Exchange Online PowerShell, run the following command to add the service principal as a member of the custom role group:
453
+
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:
0 commit comments