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: CloudAppSecurityDocs/api-authentication-application.md
+19-12Lines changed: 19 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,37 +28,43 @@ This article explains how to create a Microsoft Entra application, get an access
28
28
1. To enable your app to access Defender for Cloud Apps and assign it **'Read all alerts'** permission, on your application page, select **API Permissions** > **Add permission** > **APIs my organization uses** >, type **Microsoft Cloud App Security**, and then select **Microsoft Cloud App Security**.
29
29
30
30
> [!NOTE]
31
-
> *Microsoft Cloud App Security*does not appear in the original list. Start writing its name in the text box to see it appear. Make sure to type this name, even though the product is now called Defender for Cloud Apps.
31
+
> *Microsoft Cloud App Security*doesn't appear in the original list. Start writing its name in the text box to see it appear. Make sure to type this name, even though the product is now called Defender for Cloud Apps.
32
32
33
-

34
33
35
-
- Select **Application permissions** > **Investigation.Read**, and then select **Add permissions**.
34
+
:::image type="content" source="media/api-authentication-application/add-app-permissions.png" alt-text="Screenshot showing how to configure API permissions for your application." lightbox="media/api-authentication-application/add-app-permissions.png":::
36
35
37
-
:::image type="content" source="media/application-permissions.png" alt-text="Screenshot of adding app permission." lightbox="media/application-permissions.png":::
38
36
39
-
You need to select the relevant permissions. **Investigation.Read** is only an example. For other permission scopes, see [Supported permission scopes](#supported-permission-scopes)
37
+
1. Select **Application permissions** > **Investigation.Read**, and then select **Add permissions**.
40
38
41
-
- To determine which permission you need, look at the **Permissions** section in the API you're interested to call.
39
+
:::image type="content" source="media/api-authentication-application/request-permissions.png" alt-text="Screenshot that shows which API permissions to request for your application." lightbox="media/api-authentication-application/request-permissions.png":::
40
+
41
+
1. You need to select the relevant permissions. **Investigation.Read** is only an example. For other permission scopes, see [Supported permission scopes](#supported-permission-scopes)
42
+
43
+
1. To determine which permission you need, look at the **Permissions** section in the API you're interested to call.
42
44
43
45
1. Select **Grant admin consent**.
44
46
45
47
> [!NOTE]
46
48
> Every time you add a permission, you must select **Grant admin consent** for the new permission to take effect.
47
49
48
-

49
50
50
-
1. To add a secret to the application, select **Certificates & secrets**, select **New client secret**, add a description to the secret, and then select **Add**.
51
+
:::image type="content" source="media/api-authentication-application/grant-consent.png" alt-text="Screenshot that shows the option to grant admin consent." lightbox="media/api-authentication-application/grant-consent.png":::
52
+
53
+
54
+
1. To add a secret to the application, select **Certificates & secrets**, select **New client secret**. Add a description to the secret, and then select **Add**.
51
55
52
56
> [!NOTE]
53
57
> After you select **Add**, select **copy the generated secret value**. You won't be able to retrieve this value after you leave.
54
58
55
-

59
+
:::image type="content" source="media/api-authentication-application/webapp-create-key2.png" alt-text="Screenshot that shows how to create an app key." lightbox="media/api-authentication-application/webapp-create-key2.png":::
60
+
56
61
57
62
1. Write down your application ID and your tenant ID. On your application page, go to **Overview** and copy the **Application (client) ID** and the **Directory (tenant) ID**.
58
63
59
-

64
+
:::image type="content" source="media/api-authentication-application/app-and-tenant-ids.png" alt-text="Screenshot that shows the created app ID." lightbox="media/api-authentication-application/app-and-tenant-ids.png":::
65
+
60
66
61
-
1.**For Microsoft Defender for Cloud Apps Partners only**. Set your app to be multitenanted (available in all tenants after consent). This is **required** for third-party apps (for example, if you create an app that is intended to run in multiple customers' tenant). This is **not required** if you create a service that you want to run in your tenant only (for example, if you create an application for your own usage that will only interact with your own data). To set your app to be multitenanted:
67
+
1.**For Microsoft Defender for Cloud Apps Partners only**. Set your app to be multitenant (available in all tenants after consent). This is **required** for third-party apps (for example, if you create an app that is intended to run in multiple customers' tenant). This is **not required** if you create a service that you want to run in your tenant only (for example, if you create an application for your own usage that will only interact with your own data). To set your app to be multitenant:
62
68
63
69
- Go to **Authentication**, and add `https://portal.azure.com` as the **Redirect URI**.
64
70
@@ -179,7 +185,8 @@ Ensure that you got the correct token:
179
185
1. Validate that you get a 'roles' claim with the desired permissions
180
186
1. In the following image, you can see a decoded token acquired from an app with permissions to all Microsoft Defender for Cloud Apps roles:
181
187
182
-

188
+
:::image type="content" source="media/api-authentication-application/webapp-decoded-token.png" alt-text="Screenshot that shows the decoded token.":::
189
+
183
190
184
191
## Use the token to access Microsoft Defender for Cloud Apps API
0 commit comments