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-15Lines changed: 21 additions & 15 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: 8/22/2023
6
+
ms.date: 8/25/2023
7
7
ms.audience: Admin
8
8
audience: Admin
9
9
ms.topic: article
@@ -134,18 +134,18 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
134
134
135
135
2. [Assign API permissions to the application](#step-2-assign-api-permissions-to-the-application).
136
136
137
-
An application object has the default permission `User.Read`. For the application object to access resources, it needs to have the Applicationpermission `Exchange.ManageAsApp`.
137
+
An application object has the **Delegated** API permission **Microsoft Graph** \> **User.Read** by default. For the application object to access resources in Exchange, it needs the **Application** API permission **Office 365 Exchange Online** \> **Exchange.ManageAsApp**.
138
138
139
139
3. [Generate a self-signed certificate](#step-3-generate-a-self-signed-certificate)
140
140
141
141
- For app-only authentication in Azure AD, you typically use a certificate to request access. Anyone who has the certificate and its private key can use the app with the permissions granted to the app.
142
142
143
143
- Create and configure a self-signed X.509 certificate, which is used to authenticate your Application against Azure AD, while requesting the app-only access token.
144
144
145
-
- This procedure is similar to generating a password for user accounts. The certificate can be self-signed as well. See the [Appendix](#step-3-generate-a-self-signed-certificate) section later in this article for instructions for generating certificates in PowerShell.
145
+
- This procedure is similar to generating a password for user accounts. The certificate can be self-signed as well. See [this section](#step-3-generate-a-self-signed-certificate) later in this article for instructions to generate certificates in PowerShell.
146
146
147
147
> [!NOTE]
148
-
> Cryptography: Next Generation (CNG) certificates are not supported for app-only authentication with Exchange. CNG certificates are created by default in modern Windows versions. You must use a certificate from a CSP key provider. The [Appendix](#step-3-generate-a-self-signed-certificate) section covers two supported methods to create a CSP certificate.
148
+
> Cryptography: Next Generation (CNG) certificates aren't supported for app-only authentication with Exchange. CNG certificates are created by default in modern versions of Windows. You must use a certificate from a CSP key provider. [This section](#step-3-generate-a-self-signed-certificate) section covers two supported methods to create a CSP certificate.
149
149
150
150
4. [Attach the certificate to the Azure AD application](#step-4-attach-the-certificate-to-the-azure-ad-application)
151
151
@@ -179,7 +179,9 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
179
179
> [!NOTE]
180
180
> To make the application multi-tenant for **Exchange Online** delegated scenarios, select the value **Accounts in any organizational directory (Any Azure AD directory - Multitenant)**.
181
181
182
-
- **Redirect URI (optional)**: This setting is optional. In the first box, verify that **Web** is selected. In the second box, enter the URI where the access token is sent.
182
+
- **Redirect URI (optional)**: This setting is optional. If you need to use it, configure the following settings:
183
+
- **Platform**: Select **Web**.
184
+
- **URI**: Enter the URI where the access token is sent.
183
185
184
186
> [!NOTE]
185
187
> You can't create credentials for [native applications](/azure/active-directory/manage-apps/application-proxy-configure-native-client-application), because you can't use native applications for automated applications.
@@ -309,7 +311,7 @@ Choose **one** of the following methods in this section to assign API permission
309
311
310
312
- **Status**: The current incorrect value is **Not granted for \<Organization\>** for the **Office 365 Exchange Online** \> **Exchange.ManageAsApp** entry.
311
313
312
-
Change this value by selecting **Grant admin consent for \<Organization\>**, reading the confirmation dialog that opens, and then selecting **Yes**.
314
+
Change the **Status** value by selecting **Grant admin consent for \<Organization\>**, reading the confirmation dialog that opens, and then selecting **Yes**.
313
315
314
316

315
317
@@ -480,36 +482,40 @@ For information about creating custom role groups, see [Create role groups in Ex
480
482
481
483
To assign custom role groups to the application using service principals, do the following steps:
482
484
483
-
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:
485
+
1. In [Microsoft Graph PowerShell](/powershell/microsoftgraph/installation), run the following commands to store the details of the Azure AD application that you registered in [Step 1](#step-1-register-the-application-in-azure-ad) in a variable:
For detailed syntax and parameter information, see [Get-AzureADServicePrincipal](/powershell/module/azuread/get-azureadserviceprincipal).
501
+
For detailed syntax and parameter information, see [Get-MgServicePrincipal](/powershell/module/microsoft.graph.applications/get-mgserviceprincipal).
496
502
497
503
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:
498
-
- Create a service principal object for the Azure application.
499
-
- Store the details of the service principal in a variable.
504
+
- Create a service principal object for the Azure AD application.
505
+
- Store the details of the service principal in a variable to use in the next step.
0 commit comments