ADFS - Append String to End of Attribute Passed

Greg 26 Reputation points
2020-04-15T15:58:33.3+00:00

Good morning,

I'm dealing with a challenge with the value passed by ADFS to an application in a particular attribute.
Here is what he have for the value passed in the Claim Rule:

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory", types = ("User.username"), query = ";userPrincipalName;{0}", param = c.Value);

I need the value of the "User.username" attribute passed to the application during sign-on to have ".stage" appended to the end. How do I accomplish this?

I thought changing "c.Value" to "c.Value + '.stage'" might work in param, but I think that didn't work.

Active Directory Federation Services
Active Directory Federation Services
An Active Directory technology that provides single-sign-on functionality by securely sharing digital identity and entitlement rights across security and enterprise boundaries.
1,220 questions
0 comments No comments
{count} votes

Accepted answer
  1. DS 106 Reputation points
    2020-04-15T17:00:26.59+00:00

    i think this rule will do

    c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"]
    => issue(Type = "User.username", Value = c.Value + ".stage");

    as when AD is your claim provider, it already generates a claim "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn" with the UserPrincipalName, and this rule simply set the right type and append the string .stage

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful