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
@@ -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/21/2023
6
+
ms.date: 8/22/2023
7
7
ms.audience: Admin
8
8
audience: Admin
9
9
ms.topic: article
@@ -179,85 +179,149 @@ 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)**: 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. In the first box, verify that **Web** is selected. In the second box, enter the URI where the access token is sent.
183
183
184
184
> [!NOTE]
185
-
> You can't create credentials for [native applications](/azure/active-directory/manage-apps/application-proxy-configure-native-client-application), because you can't use that type for automated applications.
185
+
> 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.
186
186
187
187

188
188
189
189
When you're finished on the **App registrations** page, select **Register**.
190
190
191
-
4. Leave the app page that you return to open. You'll use it in the next step.
191
+
4. You're taken to the **Overview** page of the app you just registered. Leave this page open. You'll use it in the next step.
192
192
193
193
### Step 2: Assign API permissions to the application
194
194
195
-
> [!NOTE]
196
-
> The procedures in this section replace any default permissions that were automatically configured for the new app. The app doesn't need the default permissions that were replaced.
195
+
Choose **one** of the following methods in this section to assign API permissions to the app:
196
+
197
+
- Select and assign the API permissions from the portal.
198
+
- Modify the app manifest to assign API permissions. (Microsoft 365 GCC High and DoD organizations should use this method)
199
+
200
+
#### Select and assign the API permissions from the portal
201
+
202
+
1. On the app **Overview** page, select **API permissions** from the **Manage** section.
203
+
204
+

205
+
206
+
2. On the app **API Permissions** page, select **Add a permission**.
207
+
208
+

209
+
210
+
3. In the **Request API permissions** flyout that opens, select the **APIs my organization uses** tab, start typing **Office 365 Exchange Online** in the **Search** box, and then select it from the results.
211
+
212
+

213
+
214
+
5. On the **What type of permissions does your application require?** flyout that appears, select **Application permissions**.
215
+
216
+
6. In the permissions list that appears, expand **Exchange**, select **Exchange.ManageAsApp**, and then select **Add permissions**.
217
+
218
+

197
219
198
-
1. On the app page under **Management**, select **Manifest**.
220
+
7. Back on the app **API permissions** page, verify **Office 365 Exchange Online** \> **Exchange.ManageAsApp** is listed and contains the following values:
221
+
- **Type**: **Application**.
222
+
- **Admin consent required**: **Yes**.
199
223
200
-

224
+
- **Status**: The current incorrect value is **Not granted for \<Organization\>**.
201
225
202
-
2. On the **Manifest** page that opens, find the `requiredResourceAccess` entry (on or about line 47).
226
+
Change this value by selecting **Grant admin consent for \<Organization\>**, reading the confirmation dialog that opens, and then selecting **Yes**.
203
227
204
-
Modify the `resourceAppId`, `resourceAccess id`, and `resourceAccess type` values as shown in the following code snippet:
228
+

229
+
230
+
The **Status** value is now **Granted for \<Organization\>**.
231
+
232
+

233
+
234
+
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.
235
+
236
+

237
+
238
+
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.
239
+
240
+
#### Modify the app manifest to assign API permissions
241
+
242
+
> [!NOTE]
243
+
> The procedures in this section _append_ the existing default permissions on the app (delegated **User.Read** permissions in **Microsoft Graph**) with the required application **Exchange.Manage.AsApp** permissions in **Office 365 Exchange Online**.
244
+
245
+
1. On the app **Overview** page, select **Manifest** from the **Manage** section.
246
+
247
+

248
+
249
+
2. On the app **Manifest** page, find the `requiredResourceAccess` entry (on or about line 42), and make the entry look like the following code snippet:
> Microsoft 365 GCC High or DoD environments have access to Security & Compliance PowerShell only. Use the following values for `resourceAppId`, `resourceAccess id`, and `resourceAccess type`:
275
+
> Microsoft 365 GCC High or DoD environments have access to Security & Compliance PowerShell only. Use the following values for the `requiredResourceAccess` entry:
When you're finished on the **Manifest** page, select **Save**.
238
301
239
-
3. Still on the **Manifest** page, select **API permissions** under **Management**.
302
+
3. Still on the **Manifest** page, select **API permissions** from the **Manage** section.
240
303
241
-

304
+

242
305
243
-
On the **API permissions** page that opens, do the following steps:
306
+
4. On the **API permissions** page, verify **Office 365 Exchange Online** \> **Exchange.ManageAsApp** is listed and contains the following values:
307
+
- **Type**: **Application**.
308
+
- **Admin consent required**: **Yes**.
244
309
245
-
- **API / Permissions name**: Verify the value **Exchange.ManageAsApp** is shown.
310
+
- **Status**: The current incorrect value is **Not granted for \<Organization\>** for the **Office 365 Exchange Online** \> **Exchange.ManageAsApp** entry.
246
311
247
-
> [!NOTE]
248
-
> If necessary, search for **Office 365 Exchange** under **APIs my organization uses** on the **Request API Permissions** page.
312
+
Change this value by selecting **Grant admin consent for \<Organization\>**, reading the confirmation dialog that opens, and then selecting **Yes**.
249
313
250
-
- **Status**: The current incorrect value is **Not granted for \<Organization\>**, and this value needs to be changed.
314
+

251
315
252
-

316
+
The **Status** value is now **Granted for \<Organization\>**.
253
317
254
-
Select **Grant admin consent for \<Organization\>**, read the confirmation dialog that opens, and then select **Yes**.
318
+

255
319
256
-
The **Status** value should now be **Granted for \<Organization\>**.
320
+
5. 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.

259
323
260
-
4. 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.
324
+
6. 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.
261
325
262
326
### Step 3: Generate a self-signed certificate
263
327
@@ -292,11 +356,11 @@ After you register the certificate with your application, you can use the privat
292
356
293
357

294
358
295
-
2. On the application page that opens, under **Manage**, select **Certificates & secrets**.
359
+
2. On the application page that opens, select **Certificates & secrets** from the **Manage** section.
296
360
297
361

298
362
299
-
3. On the **Certificates & secrets** page that opens, select **Upload certificate**.
363
+
3. On the **Certificates & secrets** page, select **Upload certificate**.
300
364
301
365

0 commit comments