Still Refused After the Script Ran? Exchange's Permission Cache and the 30-Minute Rule
Your RBAC for Applications script ran, the test command says the mailbox is in scope, and the app still gets 403. The cause is usually Exchange's permission cache, and checking again makes it last longer. What we saw, and three rules that avoid it.

Short answer: Exchange Online caches each app's permissions. After you grant an app access with RBAC for Applications, the app can go on being refused for 30 minutes if it stays quiet, and for up to 2 hours if it keeps calling. Every retry keeps the old answer alive. Stop the app from calling that mailbox, wait 30 minutes, then try once. Test-ServicePrincipalAuthorization bypasses the cache, so use it to confirm your setup while you wait.
This guide is for administrators who have followed the steps to limit an app to named mailboxes and for developers whose app is on the receiving end.
The symptom
- You ran
New-ServicePrincipal,New-ManagementScopeandNew-ManagementRoleAssignmentwithout an error. Test-ServicePrincipalAuthorizationshowsInScopeasTruefor the mailbox.- The app still gets HTTP 403 from Microsoft Graph when it asks for that mailbox.
Everything looks right, and it is. The grant exists. The app has not been told yet.
What Microsoft documents
Microsoft's page on RBAC for Applications lists this under limitations. In summary:
| Situation | How long the old answer lasts |
|---|---|
| The app has made no calls | The cache resets after 30 minutes |
| The app is active | The cache is kept alive for up to 2 hours |
| The test command | Bypasses the cache |
The middle row is the one that hurts. An app that keeps asking is an active app.
What we saw
We build a shared mailbox audit that is given access through RBAC for Applications. On 27 November 2026 we set it up against a real tenant for the first time, and walked straight into this.
| Step | What happened |
|---|---|
| 1 | The app checked the mailbox before the administrator had run the script. It was refused, as it should have been |
| 2 | The administrator ran the script. Exchange's test command showed the mailbox in scope |
| 3 | The app checked again every two minutes |
| 4 | 75 minutes later it was still refused |
| 5 | We stopped the checks |
| 6 | After 36 minutes with no calls, the first check succeeded |
The first call, in step 1, fixed the answer as "no permissions". Each check after that kept the cached answer alive. Nothing was wrong with the grant. Our own impatience held the door shut.
Once access arrived it behaved exactly as scoped: the app read the one mailbox it was given and was refused on two others.
Three rules
- Do not call a mailbox before its script has run. The first call fixes the answer for at least 30 minutes. If the app has never asked, there is nothing stale to wait out.
- After a refusal, leave that mailbox alone for 30 minutes. No retries, no "just one more check". One attempt after a quiet half hour tells you more than thirty attempts during it.
- Tell people the real waiting time. For a new organization, about 30 minutes after the script. For a mailbox added to an organization the app is already reading, allow up to 2 hours, because the app is active there.
Check these before you blame the cache
The cache explains a delay. It does not explain a mistake. While you wait, rule these out with the test command, which is not cached:
| Check | How |
|---|---|
| The mailbox is in scope | Test-ServicePrincipalAuthorization -Identity <Application ID> -Resource <mailbox> shows InScope as True |
| The role is the one the app needs | The same output lists RoleName and GrantedPermissions. An app that reads mailbox settings needs a role for that as well as one for mail |
| The right ids were used | Get-ServicePrincipal shows the Application ID and Object ID. Both must match the app's Enterprise applications page in Entra, not App registrations |
| The scope filter says what you meant | Get-ManagementScope -Identity <scope> shows the filter. Read the address character by character |
| The app is calling your organization | The app must request its token for your tenant, not its own |
If all five are right and the app is still refused, it is the cache.
The cache cuts both ways
Removing access is a permission change too. Microsoft's wording covers changes in general, so allow for the same window after you take a grant away: an app that is busy at the time may keep its old access for up to 2 hours.
If you are removing an app because you no longer trust it, do not rely on the Exchange assignment alone. Delete the app under Enterprise applications in Entra as well, so that it can get no new token.
If you build the app
Design the first-run experience around the cache instead of fighting it.
- Do not probe a mailbox to see whether access has arrived. Ask the administrator to confirm the script has run, and wait.
- After a refusal, record the time and refuse to try that mailbox again for 30 minutes. Show the administrator when the next attempt is allowed.
- Never poll.
- Say "about 30 minutes" in your instructions, and "up to 2 hours" for a mailbox added later. An honest number costs you less than a support ticket.
- Point administrators to
Test-ServicePrincipalAuthorizationas the way to confirm their work without disturbing anything.
Our service now does all five. It cost us an hour and a quarter to learn why.
Frequently asked questions
How long does RBAC for Applications take to apply?
Between 30 minutes and 2 hours, according to Microsoft. It is 30 minutes if the app makes no calls in that time, and up to 2 hours if the app keeps calling.
Why does the test command say the mailbox is in scope when the app is refused?
The test command reads the configuration directly and bypasses the cache. The app's real calls go through the cache. Until the cache refreshes, the two disagree.
Can I clear the cache?
Microsoft's page describes no command to clear it. The only lever it describes is time without calls.
Does retrying help?
No. It does the opposite. Each call counts as activity, and the cache of an active app is kept alive for longer.
Is a 403 always the cache?
No. A 403 is also what the app gets for a mailbox outside its scope, which is the limit working as intended. Use the test command to tell the two apart: InScope False means the mailbox is not covered, True means wait.
Does the cache affect permissions granted in Microsoft Entra ID?
This guide is about grants made in Exchange Online with RBAC for Applications. Permissions granted in Entra reach the app through its token, and follow their own timing.
Sources
- Microsoft Learn, Role Based Access Control for Applications in Exchange Online, "Limitations", read 30 November 2026.
- Our own first setup in one Microsoft 365 tenant, 27 November 2026.