azure-ad-b2c / unit-tests

Azure AD B2C custom policies unit tests
33 stars 16 forks source link

Unable to use {SAML:RelayState} and the example doesn't seem to use it either #11

Open User190232 opened 1 year ago

User190232 commented 1 year ago

I was linked to this repo from this guide: https://learn.microsoft.com/en-us/azure/active-directory-b2c/claim-resolver-overview#saml

I am unable to see this line getting used in the policy: https://github.com/azure-ad-b2c/unit-tests/blob/1e49bfcc94eb86a5b570a2efec1ad520882e0d56/claims-resolver/CR_SAML.xml#LL158C18-L158C18

I tried adding to the url to maybe make it show up like: https://samltestapp2.azurewebsites.net/SP?abc=123

but I don't see how to create a situation in which that output claim is populated.

I have also tried using it in my own custom policy in both an SP and IdP initiated flows and can't seem to get it to work.

Can the test app be updated to show the RelayState claims resolver working?

Thanks

P.S. Unrelated but also important to me. If there was a claims resolver to get the ID attribute from the saml response or request that would be really useful? I'd like to use it to make sure a response in an IdP initiated SSO is only ever used once, but as of right now none of the claims resolvers give me something that would be unique per response which makes this difficult.