Skip to content

Commit 3c15ea3

Browse files
authored
Merge pull request #8923 from MicrosoftDocs/main
Auto push to live 2025-05-14 10:02:01
2 parents 4ea95f6 + b049acb commit 3c15ea3

File tree

10 files changed

+79
-7
lines changed

10 files changed

+79
-7
lines changed

support/entra/entra-id/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@
309309
href: users-groups-entra-apis/add-owner-for-application-microsoft-graph.md
310310
- name: NoPermissionsInAccessToken when calling me endpoint
311311
href: users-groups-entra-apis/error-call-me-endpoint-microsoft-graph.md
312+
- name: HTTP 403 authorization error when calling Microsoft Graph Security API
313+
href: users-groups-entra-apis/403-error-when-calling-microsoft-graph-security-api.md
312314
- name: Tenant doesn't have premium license error when query sign-in activities
313315
href: users-groups-entra-apis/b2c-or-tenant-premium-license-sign-in-activities.md
314316
- name: Problem with using the Graph SDK - libraries
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: HTTP 403 Authorization Error When Calling Microsoft Graph Security API
3+
description: Provides solutions to an HTTP 403 error that occurs when you call the Microsoft Graph Security API.
4+
ms.date: 05/14/2025
5+
ms.service: entra-id
6+
ms.custom: sap:Getting access denied errors (Authorization)
7+
ms.reviewer: bachoang, v-weizhu
8+
---
9+
# HTTP 403 authorization error when calling the Microsoft Graph Security API
10+
11+
This article provides solutions to an HTTP 403 error that occurs when you call the Microsoft Graph Security API.
12+
13+
## Symptoms
14+
15+
When using the Microsoft Graph Security API to call endpoints such as `https://graph.microsoft.com/v1.0/security/alert` and `https://graph.microsoft.com/beta/security/secoreScores`, you might receive a 403 error with the following message:
16+
17+
> Auth token does not contain valid permissions or user does not have valid roles
18+
19+
## Cause
20+
21+
The error occurs due to one of the following reasons:
22+
23+
- The access token lacks the necessary Microsoft Graph permissions for the security endpoints.
24+
- The authenticating user that obtains the access token doesn't have a Microsoft Entra admin role required for the delegated permission type token.
25+
26+
## Solution 1: Use valid Microsoft Graph permissions
27+
28+
There are two types of tokens: application and delegated permission tokens. For more information, see [Application and delegated permissions for access tokens in the Microsoft identity platform](../app-integration/application-delegated-permission-access-tokens-identity-platform.md).
29+
30+
For delegated permission tokens, the Microsoft Graph permissions are in the `scp` claim. For application permission tokens, the permissions are in the `roles` claim. To get the required Microsoft Graph permissions, you can refer to the following table, which is also listed in [Authorization and the Microsoft Graph Security API](/graph/security-authorization#register-an-application-with-the-microsoft-identity-platform-endpoint):
31+
32+
|Permission | Entity | Supported requests |
33+
|:----------|:-------|:-------------------|
34+
|SecurityActions.Read.All| • [securityActions](/graph/api/resources/securityaction) (preview) | GET |
35+
|SecurityActions.ReadWrite.All| • [securityActions](/graph/api/resources/securityaction) (preview) | GET, POST |
36+
|SecurityEvents.Read.All | &bull; [alerts](/graph/api/resources/alert)</br> &bull; [secureScores](/graph/api/resources/securescore) </br> &bull; [secureScoreControlProfiles](/graph/api/resources/securescorecontrolprofiles) | GET |
37+
|SecurityEvents.ReadWrite.All | &bull; [alerts](/graph/api/resources/alert)</br> &bull; [secureScores](/graph/api/resources/securescore) </br> &bull; [secureScoreControlProfiles](/graph/api/resources/securescorecontrolprofiles) | GET, POST, PATCH |
38+
|ThreatIndicators.ReadWrite.OwnedBy | &bull; [tiIndicator](/graph/api/resources/tiindicator) (preview) | GET, POST, PATCH, DELETE|
39+
40+
For more information, see [Use the Microsoft Graph security API](/graph/api/resources/security-api-overview) and [Microsoft Graph permissions reference](/graph/permissions-reference).
41+
42+
## Solution 2: Use valid Microsoft Entra admin roles
43+
44+
For delegated permission tokens, the authenticating user needs to have one of the following admin roles:
45+
46+
|Microsoft Entra role|Role template ID|
47+
|---|---|
48+
|Security Reader|5d6b6bb7-de71-4623-b4af-96380a352509|
49+
|Security Administrator|194ae4cb-b126-40b2-bd5b-6091b380977d|
50+
|Global Administrator|62e90394-69f5-4237-9190-012177145e10|
51+
52+
For more information, see [Microsoft Entra built-in roles](/entra/identity/role-based-access-control/permissions-reference) and [Authorization and the Microsoft Graph Security API](/graph/security-authorization).
53+
54+
The `wids` claim in the token contains the Microsoft Entra role. It can be used to determine whether the user has sufficient privileges.
55+
56+
```json
57+
"ver": "1.0"
58+
"wids": [
59+
"62e90394-69f5-4237-9190-012177145e10",
60+
"b79fbf4d-3ef9-4689-8143-76b194e85509"
61+
],
62+
"xms_st":{
63+
"sub": "<sub>"
64+
}
65+
```
66+
67+
> [!NOTE]
68+
> If the token is obtained via the [implicit grant flow](/entra/identity-platform/v2-oauth2-implicit-grant-flow), the `wids` claim might not exist. For more information, see [Access tokens in the Microsoft identity platform](/entra/identity-platform/access-tokens). In this case, use a different OAuth 2 grant flow, such as the [authorization code flow](/entra/identity-platform/v2-oauth2-auth-code-flow), to obtain the access token.
69+
70+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

support/power-platform/dataverse/email-exchange-synchronization/incoming-emails-unexpectedly-synchronized-have-unexpected-missing-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ To avoid duplicate emails to be tracked or synchronized:
6363
2. Navigate to **Settings** > **Email Configuration** > **Email Configuration Settings**.
6464
3. Under the **Set tracking options for emails between Microsoft Dynamics 365 users** setting, clear the **Track emails sent between Dynamics 365 users as two activities** option.
6565

66-
:::image type="content" source="media/incoming-emails-unexpectedly-synchronized-have-unexpected-missing-data/track-emails-sent-between-dynamics-365-as-two-activities.png" alt-text="Screenshot that shows the Set tracking options for emails between Microsoft Dynamics 365 users setting.":::
66+
:::image type="content" source="media/incoming-emails-unexpectedly-synchronized-have-unexpected-missing-data/track-emails-sent.png" alt-text="Screenshot that shows the Set tracking options for emails between Microsoft Dynamics 365 users setting.":::
6767

6868
For more information about how the system detects if an email should be automatically promoted, see [Specify which emails are automatically tracked](/power-platform/admin/email-message-filtering-correlation).
6969

support/power-platform/dataverse/email-exchange-synchronization/media/incoming-emails-unexpectedly-synchronized-have-unexpected-missing-data/track-emails-sent-between-dynamics-365-as-two-activities.png renamed to support/power-platform/dataverse/email-exchange-synchronization/media/incoming-emails-unexpectedly-synchronized-have-unexpected-missing-data/track-emails-sent.png

File renamed without changes.

support/windows-server/active-directory/active-directory-domain-join-troubleshooting-guidance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Active Directory domain join troubleshooting guidance
33
description: Provides guidance to troubleshoot domain join issues.
4-
ms.date: 05/13/2025
4+
ms.date: 05/14/2025
55
manager: dcscontentpm
66
audience: itpro
77
ms.topic: troubleshooting
@@ -68,8 +68,8 @@ The following table lists the ports required to be open between the client compu
6868

6969
For more information, see:
7070

71-
- Troubleshoot [Networking error messages and resolutions](troubleshoot-errors-join-computer-to-domain.md#networking-error-messages-and-resolutions)
72-
- Troubleshoot [Authentication error messages and resolutions](troubleshoot-errors-join-computer-to-domain.md#authentication-error-messages-and-resolutions)
71+
- [Troubleshoot networking errors](domain-join-networking-errors.md)
72+
- [Troubleshoot authentication errors](domain-join-authentication-errors.md)
7373

7474
## Data collections for domain join issues
7575

support/windows-server/certificates-and-public-key-infrastructure-pki/cannot-select-windows-server-2016-ca-compatible-certificate-templates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Consider either of the following scenarios:
2525
- You install a new Windows Server 2016 Certification Authority (CA).
2626
- You configure the compatibility settings of a certificate template by setting **Certification Authority** to **Windows Server 2016** and **Certificate recipient** to **Windows 10 / Windows Server 2016**.
2727

28-
:::image type="content" source="media/cannot-select-windows-server-2016-ca-compatible-certificate-templates/compatibility-settings-of-a-certificate-template.png" alt-text="Screenshot of the compatibility settings of a certificate template, showing the compatibility level set to Windows Server 2016 and Windows 10.":::
28+
:::image type="content" source="media/cannot-select-windows-server-2016-ca-compatible-certificate-templates/compatibility-settings-certificate-template.png" alt-text="Screenshot of the compatibility settings of a certificate template, showing the compatibility level set to Windows Server 2016 and Windows 10.":::
2929

3030
When Windows 10 users try to request certificates by using the CA Web enrollment page (the CEP URL), the certificate template that you configured as described here is not listed as an available template.
3131

@@ -44,7 +44,7 @@ To work around this issue, follow these steps:
4444
- **Certificate Authority**: **Windows Server 2012 R2**
4545
- **Certificate recipient**: **Windows 8.1 / Windows Server 2012 R2**
4646

47-
:::image type="content" source="media/cannot-select-windows-server-2016-ca-compatible-certificate-templates/compatibility-settings-certificate-template-authority-recipient.png" alt-text="Screenshot of the compatibility settings of a certificate template, showing the compatibility level set to Windows Server 2012 R2 and Windows 8.1.":::
47+
:::image type="content" source="media/cannot-select-windows-server-2016-ca-compatible-certificate-templates/certificate-template-authority-recipient.png" alt-text="Screenshot of the compatibility settings of a certificate template, showing the compatibility level set to Windows Server 2012 R2 and Windows 8.1.":::
4848

4949
2. Wait 30 minutes for the CEP server to receive the updated template information (or use the IISReset tool to restart the server).
5050
3. On the client computer, clear the client-side Enrollment Policy Cache by using the following command in a Command Prompt window:

support/windows-server/certificates-and-public-key-infrastructure-pki/media/cannot-select-windows-server-2016-ca-compatible-certificate-templates/compatibility-settings-certificate-template-authority-recipient.png renamed to support/windows-server/certificates-and-public-key-infrastructure-pki/media/cannot-select-windows-server-2016-ca-compatible-certificate-templates/certificate-template-authority-recipient.png

File renamed without changes.

support/windows-server/certificates-and-public-key-infrastructure-pki/media/cannot-select-windows-server-2016-ca-compatible-certificate-templates/compatibility-settings-of-a-certificate-template.png renamed to support/windows-server/certificates-and-public-key-infrastructure-pki/media/cannot-select-windows-server-2016-ca-compatible-certificate-templates/compatibility-settings-certificate-template.png

File renamed without changes.

support/windows-server/certificates-and-public-key-infrastructure-pki/media/set-up-certificate-based-authentication-across-forest-without-trust/enable-active-directory-client-certificate-authentication.png renamed to support/windows-server/certificates-and-public-key-infrastructure-pki/media/set-up-certificate-based-authentication-across-forest-without-trust/enable-client-certificate-authentication.png

File renamed without changes.

support/windows-server/certificates-and-public-key-infrastructure-pki/set-up-certificate-based-authentication-across-forest-without-trust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ To configure the IIS Web server in the resource forest, follow these steps:
7070

7171
2. On the IIS Web server, enable **Active Directory Client Certificate Authentication**.
7272

73-
:::image type="content" source="./media/set-up-certificate-based-authentication-across-forest-without-trust/enable-active-directory-client-certificate-authentication.png" alt-text="Enabling the Active Directory Client Certificate Authentication.":::
73+
:::image type="content" source="./media/set-up-certificate-based-authentication-across-forest-without-trust/enable-client-certificate-authentication.png" alt-text="Enabling the Active Directory Client Certificate Authentication.":::
7474

7575
3. On your website, configure **SSL Settings** to **Require SSL** and then under **Client certificates**, select **Require**.
7676

0 commit comments

Comments
 (0)