Skip to content

Commit 4d07145

Browse files
authored
Merge pull request #11188 from MicrosoftDocs/chrisda
Added UI section to Step 2
2 parents f326424 + b351fb1 commit 4d07145

10 files changed

+107
-43
lines changed

exchange/docs-conceptual/app-only-auth-powershell-v2.md

Lines changed: 107 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: App-only authentication in Exchange Online PowerShell and Security & Comp
33
ms.author: chrisda
44
author: chrisda
55
manager: dansimp
6-
ms.date: 8/21/2023
6+
ms.date: 8/22/2023
77
ms.audience: Admin
88
audience: Admin
99
ms.topic: article
@@ -179,85 +179,149 @@ For a detailed visual flow about creating applications in Azure AD, see <https:/
179179
> [!NOTE]
180180
> To make the application multi-tenant for **Exchange Online** delegated scenarios, select the value **Accounts in any organizational directory (Any Azure AD directory - Multitenant)**.
181181
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.
183183
184184
> [!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.
186186
187187
![Register an application.](media/exo-app-only-auth-register-app.png)
188188
189189
When you're finished on the **App registrations** page, select **Register**.
190190
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.
192192
193193
### Step 2: Assign API permissions to the application
194194
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+
![Select API permissions on the application overview page.](media/exo-app-only-auth-select-manifest.png)
205+
206+
2. On the app **API Permissions** page, select **Add a permission**.
207+
208+
![Select Add a permission on the API permissions page of the application.](media/exo-app-only-auth-api-permissions-add-a-permission.png)
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+
![Find and select Office 365 Exchange Online on the APIs my organization uses tab.](media/exo-app-only-auth-api-permissions-select-o365-exo.png)
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+
![Find and select Exchange.ManageAsApp permissions from the Application permission tab.](media/exo-app-only-auth-api-permissions-select-exchange-manageasapp.png)
197219
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**.
199223
200-
![Select Manifest on the application properties page.](media/exo-app-only-auth-select-manifest.png)
224+
- **Status**: The current incorrect value is **Not granted for \<Organization\>**.
201225
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**.
203227
204-
Modify the `resourceAppId`, `resourceAccess id`, and `resourceAccess type` values as shown in the following code snippet:
228+
![Admin consent required but not granted for Exchange.ManageAsApp permissions.](media/exo-app-only-auth-original-permissions.png)
229+
230+
The **Status** value is now **Granted for \<Organization\>**.
231+
232+
![Admin consent granted for Exchange.ManageAsApp permissions.](media/exo-app-only-auth-admin-consent-granted.png)
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+
![Admin consent removed from default Microsoft Graph User.Read permissions.](media/exo-app-only-auth-admin-consent-removed-from-graph.png)
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+
![Select Manifest on the application overview page.](media/exo-app-only-auth-select-manifest.png)
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:
205250
206251
```json
207252
"requiredResourceAccess": [
208-
{
209-
"resourceAppId": "00000002-0000-0ff1-ce00-000000000000",
210-
"resourceAccess": [
211-
{
212-
"id": "dc50a0fb-09a3-484d-be87-e023b12c6440",
213-
"type": "Role"
214-
}
215-
]
216-
}
253+
{
254+
"resourceAppId": "00000002-0000-0ff1-ce00-000000000000",
255+
"resourceAccess": [
256+
{
257+
"id": "dc50a0fb-09a3-484d-be87-e023b12c6440",
258+
"type": "Role"
259+
}
260+
]
261+
},
262+
{
263+
"resourceAppId": "00000003-0000-0000-c000-000000000000",
264+
"resourceAccess": [
265+
{
266+
"id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
267+
"type": "Scope"
268+
}
269+
]
270+
}
217271
],
218272
```
219273

220274
> [!NOTE]
221-
> 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:
222276
>
223277
> ```json
224278
> "requiredResourceAccess": [
225-
> {
226-
> "resourceAppId": "00000007-0000-0ff1-ce00-000000000000",
227-
> "resourceAccess": [
228-
> {
229-
> "id": "455e5cd2-84e8-4751-8344-5672145dfa17",
230-
> "type": "Role"
231-
> }
232-
> ]
233-
> }
279+
> {
280+
> "resourceAppId": "00000007-0000-0ff1-ce00-000000000000",
281+
> "resourceAccess": [
282+
> {
283+
> "id": "455e5cd2-84e8-4751-8344-5672145dfa17",
284+
> "type": "Role"
285+
> }
286+
> ]
287+
> },
288+
> {
289+
> "resourceAppId": "00000003-0000-0000-c000-000000000000",
290+
> "resourceAccess": [
291+
> {
292+
> "id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
293+
> "type": "Scope"
294+
> }
295+
> ]
296+
> }
234297
> ],
235298
> ```
236299
237300
When you're finished on the **Manifest** page, select **Save**.
238301
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.
240303
241-
![Select API permissions on the application properties page.](media/exo-app-only-auth-select-api-permissions.png)
304+
![Select API permissions from the Manifest page.](media/exo-app-only-auth-manifest-select-api-permissions.png)
242305
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**.
244309
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.
246311
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**.
249313
250-
- **Status**: The current incorrect value is **Not granted for \<Organization\>**, and this value needs to be changed.
314+
![Admin consent required but not granted for Exchange.ManageAsApp permissions.](media/exo-app-only-auth-original-permissions.png)
251315
252-
![Original incorrect API permissions.](media/exo-app-only-auth-original-permissions.png)
316+
The **Status** value is now **Granted for \<Organization\>**.
253317
254-
Select **Grant admin consent for \<Organization\>**, read the confirmation dialog that opens, and then select **Yes**.
318+
![Admin consent granted for Exchange.ManageAsApp permissions.](media/exo-app-only-auth-admin-consent-granted.png)
255319
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.
257321
258-
![Admin consent granted.](media/exo-app-only-auth-admin-consent-granted.png)
322+
![Admin consent removed from default Microsoft Graph User.Read permissions.](media/exo-app-only-auth-admin-consent-removed-from-graph.png)
259323
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.
261325
262326
### Step 3: Generate a self-signed certificate
263327
@@ -292,11 +356,11 @@ After you register the certificate with your application, you can use the privat
292356

293357
![Apps registration page where you select your app.](media/exo-app-only-auth-app-registration-page.png)
294358

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.
296360

297361
![Select Certificates & Secrets on the application properties page.](media/exo-app-only-auth-select-certificates-and-secrets.png)
298362

299-
3. On the **Certificates & secrets** page that opens, select **Upload certificate**.
363+
3. On the **Certificates & secrets** page, select **Upload certificate**.
300364

301365
![Select Upload certificate on the Certificates & secrets page.](media/exo-app-only-auth-select-upload-certificate.png)
302366

79.1 KB
Loading
85.1 KB
Loading
99.5 KB
Loading
77.4 KB
Loading
30.1 KB
Loading
37.3 KB
Loading
75.6 KB
Loading
73 KB
Loading
22.5 KB
Loading

0 commit comments

Comments
 (0)