Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Is it possible to read a custom query string parameter from a SAML2 relying party request?.

Using the {OAUTH-KV:any custom query string} does not work.

example:

https://mytest.b2clogin.com/mytest.onmicrosoft.com/B2C_1A_TEST_SAML/samlp/sso/login?myparameter=true

I need to read the "myparameter" value into a claim.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.1k views
Welcome To Ask or Share your Answers For Others

1 Answer

Hope you are trying to do the following:

<InputClaims>
   <InputClaim ClaimTypeReferenceId="givenName" DefaultValue="{OAUTH-KV:name}" />
 </InputClaims>

To get the value from the query string you have to configure the metadata of the technical profile and set the AlwaysUseDefaultValue property of the input claim like the following:

      <Metadata>
        <Item Key="IncludeClaimResolvingInClaimsHandling">true</Item>
      </Metadata>

and

 <InputClaims>
   <InputClaim ClaimTypeReferenceId="givenName" AlwaysUseDefaultValue="true" DefaultValue="{OAUTH-KV:name}" />
 </InputClaims>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...