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
title: Tenant doesn't have premium license when querying user sign-in activities using Microsoft Graph
3
-
description: Provides solutions to the "either tenant is B2C or tenant doesn't have premium license" error when you query user sign-in activities using Microsoft Graph
2
+
title: Tenant doesn't have premium license When You Query User Sign-in Activities By Using Microsoft Graph
3
+
description: Provides solutions to the "either tenant is B2C or tenant doesn't have premium license" error when you query user sign-in activities by using Microsoft Graph
# Neither tenant is B2C or tenant doesn't have premium licensewhen querying sign-in activities
10
+
# "Neither tenant is B2C or tenant doesn't have premium license" error when you query sign-in activities
11
11
12
-
This article describes the error that occurs when you make Microsoft Graph API calls related to user sign-in activities or user registration details.
12
+
This article discusses the error that occurs when you make Microsoft Graph API calls that are related to user sign-in activities or user registration details.
13
13
14
14
## Symptoms
15
15
16
-
When you run one of the following Microsoft Graph API calls, you might see this error:
16
+
You run one of the following Microsoft Graph API calls:
17
17
18
18
```http
19
19
GET https://graph.microsoft.com/v1.0/auditLogs/signIns
@@ -23,7 +23,7 @@ GET https://graph.microsoft.com/v1.0/users?$select=displayName,userPrincipalName
23
23
GET https://graph.microsoft.com/v1.0/reports/UserRegistrationDetails
24
24
```
25
25
26
-
Example response
26
+
After you run the call, your receive an error response that resembles the following text:
27
27
28
28
```output
29
29
'error': {
@@ -36,18 +36,19 @@ Example response
36
36
}
37
37
}
38
38
```
39
+
39
40
## Solution
40
41
41
42
### Scenario 1: Query user sign-in activities
42
43
43
-
1. Make sure the target tenant has an Entra ID Premium P1 or P2 license. In the Azure portal, go to **Microsoft Entra ID**, select Overview, and then check the **License**. For more information, see [Sign up for Microsoft Entra ID P1 or P2 editions](/entra/fundamentals/get-started-premium).
44
-
1. Verify that the Microsoft Graph Access Token has been granted the `AuditLog.Read.All` and `Directory.Read.All` permissions.
44
+
1. Make sure that the target tenant has an Entra ID Premium P1 or P2 license. In the Azure portal, go to **Microsoft Entra ID**, select **Overview**, and then check the **License** value. For more information, see [Sign up for Microsoft Entra ID P1 or P2 editions](/entra/fundamentals/get-started-premium).
45
+
1. Verify that the Microsoft Graph Access Token was granted the `AuditLog.Read.All` and `Directory.Read.All` permissions.
45
46
46
47
### Scenario 2: Query credential user registration details
47
48
48
-
1. Make sure the target tenant has an Entra ID Premium P1 or P2 license.
49
-
1. Verify that the Microsoft Graph Access Token has been granted the `Reports.Read.All` permission.
50
-
1.The authenticating user or the service principle of the application must be in one of these Administrative roles:
49
+
1. Make sure that the target tenant has an Entra ID Premium P1 or P2 license.
50
+
1. Verify that the Microsoft Graph Access Token was granted the `Reports.Read.All` permission.
51
+
1.Verify that the authenticating user or the service principle of the application is in one of the following required administrative roles:
51
52
- Reports Reader
52
53
- Security Reader
53
54
- Security Administrator
@@ -56,4 +57,4 @@ Example response
56
57
57
58
## More information
58
59
59
-
If an application is configured with only the **AuditLog.Read.All** permission, this error may occur intermittently. This is expected behavior, as the **Directory.Read.All** permission is required to retrieve tenant licensing information when it isn't already cached. Ensure both permissions are included to avoid this issue.
60
+
If an application is configured by using only the **AuditLog.Read.All** permission, this error might occur intermittently. This is expected behavior because the **Directory.Read.All** permission is required to retrieve tenant licensing information if it isn't already cached. To avoid this error, make sure that both permissions are included.
0 commit comments