question

AndrewOmondi-5314 avatar image
0 Votes"
AndrewOmondi-5314 asked DianaWanjuhi-1579 answered

Retrieve auditlogs, sign-ins or user lastlogin fails with error need premium license

Using the Azure portal, one can view the audit logs, sign ins information.

However, using the graph API, the following error is returned.

Code: Authentication_RequestFromNonPremiumTenantOrB2CTenant
Message: Neither tenant is B2C or tenant doesn't have premium license


According to the error and these docs, one would need to upgrade to a premium subscription, but I can still see the logs on the portal.

  1. Is this a feature/bug? Being able to view logs on portal without premium subscription but needing the subscription for the api.

  2. If it's a bug, when will it be fixed?


Reference: https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1006






microsoft-graph-reports
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DianaWanjuhi-1579 avatar image
0 Votes"
DianaWanjuhi-1579 answered

Hello @AndrewOmondi-5314 thanks for reaching out. This looks to be working correctly - per the documentation shared, Azure AD Premium P1 (or above) license is required to access sign-in reports (via API) for any Azure AD tenant.

Let me know if you have further questions and if this helps,

Diana.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.