Solution skill
postLogoutRedirectUri not working when authority url contains a tenant ID
Complete solution
Shows how to fix postLogoutRedirectUri not working when authority url contains a tenant ID. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Two confirmed fixes from the thread: 1. Register the post-logout URI in the Azure portal: App Registrations > Authentication > add your logout URL as a redirect URI.
Steps
- For the post-logout redirect to work, all of MSAL's logout requirements must hold (the maintainer points to the logout docs checklist). Two confirmed fixes from the thread:
- Register the post-logout URI in the Azure portal: App Registrations > Authentication > add your logout URL as a redirect URI. Users confirmed the redirect started working a few minutes after whitelisting it.
- Include
logout_hint(taken from thelogin_hintclaim) in the logout request. Several users confirmed this fixed the redirect for them. - Background from the maintainer: if the signed-in tenant differs from the logout tenant (guest/external users), the service finds no session and refuses to redirect, so also check you are logging out of the same tenant you signed into. If everything above is done and it still fails, raise it through Azure Support so the service teams get looped in.
When to use
You are seeing this: Reported in Microsoft Entra ID: postLogoutRedirectUri not working when authority url contains a tenant ID. Use this skill when you run into "postLogoutRedirectUri not working when authority url contains a tenant ID".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In gh:AzureAD/microsoft-authentication-library-for-js#5783 (https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/5783), the reporter ran into this: Reported in Microsoft Entra ID: postLogoutRedirectUri not working when authority url contains a tenant ID. The verified resolution: For the post-logout redirect to work, all of MSAL's logout requirements must hold (the maintainer points to the logout docs checklist). Two confirmed fixes from the thread:
- Register the post-logout URI in the Azure portal: App Registrations > Authentication > add your logout URL as a redirect URI. Users confirmed the redirect started working a few minutes after whitelisting it.
- Include
logout_hint(taken from thelogin_hintclaim) in the logout request. Several users confirmed this fixed the redirect for them.
Background from the maintainer: if the signed-in tenant differs from the logout tenant (guest/external users), the service finds no session and refuses to redirect, so also check you are logging out of the same tenant you signed into. If everything above is done and it still fails, raise it through Azure Support so the service teams get looped in.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_ClxMvru-d3bOr0QrSmLNcA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">postLogoutRedirectUri not working when authority url contains a tenant ID <span>— Vectle</span></a>