Search code examples
.netazuremicrosoft-graph-apimicrosoft-graph-teams

Microsoft Graph getOffice365GroupsActivityDetail API returning a redirect to reportsweu.office.com and then failing with a "S2S auth failed" error


I've been consuming the getOffice365GroupsActivityDetail API for sometime without any issue and then suddenly in the last few days my calls to the API started failing since due to the 301 http status redirect that the call is now returning the Authorization header was not being sent by the HttpClient used in my code but now after having updated my code to send the bearer token, I discovered that the token that allows a successful call the https://graph.microsoft.com/v1.0/reports/getOffice365GroupsActivityDetail endpoint does not seem to be what is expected by the redirect endpoint https://reportsweu.office.com/graph/v1.0/data/[TENANT-ID]/Microsoft.O365Reporting.getOffice365GroupsActivityDetail.

Anyone have an idea of what should be done now?

The nice thing is that this API is a v1.0 API, something that should be stable :)


Solution

  • 24 hours later the getOffice365GroupsActivityDetail Microsoft Graph API seems to have stabilized to making a 301 redirect to https://reportsweu.office.com/data/v1.0/download?token=[YOUR-BEARER-TOKEN] which returns the requested report. Bearer token is moved directly as a parameter on the URL to call with no need to add it on the request object.