Shetty_914
Shetty_914

Reputation: 45

Cannot get signed in users of Azure AD tenant using Microsoft Graph

I'm trying to get the list of user sign-ins into my Azure AD tenant using Microsoft Graph.

I'm using the below query to get them.

https://graph.microsoft.com/v1.0/auditLogs/signIns

But I'm getting the error like this: Error

I understood that I'm missing a few permissions but I'm the global administrator of my tenant. I hope it is enough and no other permissions are needed. Still if needed, where to assign them?

Can anyone help me out with proper steps? Any help is appreciated. Thank you.

Upvotes: 2

Views: 609

Answers (1)

Sridevi
Sridevi

Reputation: 22317

As I already mentioned, even if you have global administrator role, you still need to assign permissions while querying in Microsoft Graph Explorer.

As the error says, to get list of sign-in logs, you need permissions like AuditLog.Read.All and Directory.Read.All.

Currently, it requires admin consent even after assigning both the permissions. As you are global admin, you can directly accept the consent.

To know how to assign those permissions and consent them, please check the steps below:

Go to Microsoft Graph Explorer -> Modify Permissions -> Select required permission -> Consent -> Accept

enter image description here

enter image description here

After assigning those permissions, you will get list of sign-in logs successfully without any errors.

enter image description here

For more information in detail, refer this.

Upvotes: 2

Related Questions