Investigate Microsoft Graph API call getOffice365ActiveUserDetail(period=’D7′) error HTTP 403 with Microsoft Graph explorer


One of my developer customer updated me that he tried calling reports from his custom application, using the Microsoft Graph API call “getOffice365ActiveUserDetail(period=’D7′)”, but receive HTTP 403. In order to isolate the issue, i tried repro the issue using Microsoft Graph Explorer and i can repro so. HTTP 403 – Forbidden!!
image

Being said that, Graph explorer updated me that i need to consent to the permissions on the “Modify Permissions” tab; in another words in order to run the reports i need the permissions. 
How cool is this new feature introduced in new MS Graph explorer?

Ok, I followed the steps in Graph explorer:

image

Just hover over the description. It provides a info clearly (see the below snapshot):

image

In order to make the permissions (admin consent required) to effect with my app (in this scenario, it will be MS Graph explorer), it thrown the dialog box to confirm:

image

On successful of the above, i made the same API call with Microsoft Graph explorer and it worked as i expected…!!

Happy Microsoft Graphing Winking smile