[GH-ISSUE #741] BUG: Mailbox Statistics - Request failed with status code 500 #377

Closed
opened 2026-03-02 12:41:46 +03:00 by kerem · 3 comments
Owner

Originally created by @kfear27 on GitHub (Feb 9, 2022).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/741

When opening mailbox statistics and selecting a tenant an error is thrown:
Request failed with status code 500

image

Email and Exchange > Reports > Mailbox Statistics

This happens to all tenants

I have updated to the latest version and the issue still persists.
A permissions check returns that the app has all the permissions it requires.

Originally created by @kfear27 on GitHub (Feb 9, 2022). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/741 When opening mailbox statistics and selecting a tenant an error is thrown: Request failed with status code 500 ![image](https://user-images.githubusercontent.com/54527192/153119070-8f1f3e92-a061-4730-bd9f-314e06e7741d.png) Email and Exchange > Reports > Mailbox Statistics This happens to all tenants I have updated to the latest version and the issue still persists. A permissions check returns that the app has all the permissions it requires.
kerem 2026-03-02 12:41:46 +03:00
Author
Owner

@KelvinTegelaar commented on GitHub (Feb 9, 2022):

not a bug. your exchange token is not working.

<!-- gh-comment-id:1033458216 --> @KelvinTegelaar commented on GitHub (Feb 9, 2022): not a bug. your exchange token is not working.
Author
Owner

@kfear27 commented on GitHub (Feb 10, 2022):

I managed to refresh the token successfully and update, it still failed. I wiped the resource group in Azure, along with the forked repo's. I then reconfigured the entire thing with a fresh app, permissions, tokens etc. Yet I am still receiving the same errors.

When I run the token permissions test script I see multiple
Connect-graphAPI : Could not log into the Graph API for tenant tenant-id-here: The remote server returned an error: (400) Bad Request

How can this fail with all new tokens?
The installation guide was followed to a tee.

<!-- gh-comment-id:1034437596 --> @kfear27 commented on GitHub (Feb 10, 2022): I managed to refresh the token successfully and update, it still failed. I wiped the resource group in Azure, along with the forked repo's. I then reconfigured the entire thing with a fresh app, permissions, tokens etc. Yet I am still receiving the same errors. When I run the token permissions test script I see multiple Connect-graphAPI : Could not log into the Graph API for tenant tenant-id-here: The remote server returned an error: (400) Bad Request How can this fail with all new tokens? The installation guide was followed to a tee.
Author
Owner

@kfear27 commented on GitHub (Feb 10, 2022):

Fixed the issue. The UPN I used for this was a 'Risky User' in AAD
Find this under AAD > Security > Risky Users
Select your user, click dismiss user risk and wait 5~10 minutes until it disappears.
Once gone test again

<!-- gh-comment-id:1034478075 --> @kfear27 commented on GitHub (Feb 10, 2022): Fixed the issue. The UPN I used for this was a 'Risky User' in AAD Find this under AAD > Security > Risky Users Select your user, click dismiss user risk and wait 5~10 minutes until it disappears. Once gone test again
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#377
No description provided.