Adding the UPN Custom Rule

Last Updated : May 30, 2017 |
Prolog information
  1. On the Active Directory system, go to Server Manager Tools Select Active Directory Federation Services Management.
  2. On the Active Directory Federation Services screen, click Relying Party Trusts.
  3. Make a note of the Identifier of the newly added entry.
  4. Right-click on the entry and select Edit Claims Issuance Policy.
  5. Click Add Rule.
  6. On the Select Rule Template page, in the Claim Rule Template field, select Send Claims using a custom rule.
  7. On the Configure Claim Rule page, enter the Display Name as UPNCustomRule and add the following code in the Custom Rule section:
    ADDITIONAL INFORMATION: c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"]
     => issue(Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
              Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer,
                   Value = c.Value, ValueType = c.ValueType,
                   Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/format"]
                        = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient",
                   Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/namequalifier"]
                        = "http://idp01.bbb.local/adfs/services/trust",
                   Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/spnamequalifier"]
                        = "BREEZE_IDENTIFIER");
  8. Modify the Custom Rule section and replace the BREEZE_IDENTIFIER text with the Identifier noted in Step 3.
  9. Click Finish.