I created azure b2c custom policy using SAML flow and cannot find documentation what logout url should I use on SP side. What I see in saml policy metadata xml:
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://tenant.b2clogin.com/tenant.onmicrosoft.com/B2C_1A_signup_signin_saml/samlp/sso/logout"/>
it does not work with my SP (zendesk) and shows error after logout redirect: AADB2C99046: The logout request does not include a session index. I investigated saml logout request and it does not contain session index element. As I understand SAML standard documentation SessionIndex is optional.
Is there any way to fix log out functionality with SAML?
here is the answer from Microsoft support:
After analyzed your request with our technical advisors and additional resources, we got a confirmation that for your particular setup which is having your B2C actuate as SAML Token Provider, the SessionIndex along with NameID is a must and needs to be provided by your Service Provider.
I know it is hard to track what requirements usually needs the setups in B2C by having the information spread everywhere but in Azure AD B2C the following are the two scenarios supported:
- Have Azure AD B2C acting as an IdP and achieving SSO with SAML-based Service Providers
- Have Azure AD B2C acting as a service provider (SP) and interacting with SAML-based identity providers like SalesForce and ADFS.
The first scenario (1), that one you have, it requires your custom policy to setup your SAML token issuer, along with the SAMLSSOSessionProvider the TechnicalProfile named as SM-Saml-Issuer. SAML session logout will not work then without your SessionIndex and NameID attributes coming from your SP.
This is the only way to achieve a successful SAML logout call from your Service Provider.
Let me know if you have any questions, I can then review this and forward it to our experts if necessary.
Best regards,
_____________________________________________________ Victor J. Hernandez | Support Engineer | Azure Support