Help with Azure Active Directory premium 1 (P1) license and reports/getOffice365ActiveUserDetail API

Shrav Mehta 21 Reputation points
2021-05-05T15:45:46.293+00:00

We are working on an integration which lets our customers connect their Office 365 account with our app and then we perform some checks on their account. One of those checks is showing active status of their employees/users accounts. We're using this endpoint reports/getOffice365ActiveUserDetail to determine if a user is active or not. But we're getting this error

{"error"=>{"code"=>"Authentication_RequestFromNonPremiumTenantOrB2CTenant", "message"=>"Neither tenant is B2C or tenant doesn't have premium license", "innerError"=>{"date"=>"2021-04-21T17:38:59", "request-id"=>"491a280f-8e35-4bdb-aa53-a1d5b69fe441", "client-request-id"=>"491a280f-8e35-4bdb-aa53-a1d5b69fe441"}}}

Upon further digging, we found this:

"Accessing sign-in reports requires an Azure Active Directory premium 1 (P1) license. If you see this error message while accessing sign-ins, make sure that your tenant is licensed with an Azure AD P1 license."

Is there a way for this to work without asking our customers to upgrade to Azure Active Directory premium 1 (P1) license? Is it possible that we can somehow subscribe to a subscription which lets us call this API successfully without needing all our customers to upgrade to Active Directory premium 1 (P1) license?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Diana Wanjuhi 1,376 Reputation points
    2021-05-17T10:37:57.64+00:00

    Hello @Shrav Mehta Per the documentation on prerequisites to access the Azure AD reporting API Azure AD Premium P1 (or above) license is required to access sign-in reports for any Azure AD tenant. Alternatively if the directory type is Azure AD B2C, the sign-in reports are accessible through the API without any additional license requirement.

    Please let me know if you have further questions,

    Diana.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.