{"id":1453,"date":"2015-01-30T15:52:54","date_gmt":"2015-01-30T21:52:54","guid":{"rendered":"https:\/\/www.identityblog.com\/?page_id=1453"},"modified":"2015-01-31T12:14:17","modified_gmt":"2015-01-31T18:14:17","slug":"claims-transformations","status":"publish","type":"page","link":"https:\/\/www.identityblog.com\/?page_id=1453","title":{"rendered":"Claims Transformations"},"content":{"rendered":"<p>A claims transformation converts one or more &#8216;input claims&#8217; into an &#8216;output claim&#8217;.<\/p>\n<p>There are a number of different claims transformations supported in AAD B2C, and new transformations types will be added as required.<\/p>\n<p>Sometimes it is helpful to have some constant defined in the policy that is used as part of the transformation.\u00a0 This is done by allowing a &#8216;parameter&#8217; to be defined as an input to the transformation.\u00a0 Claims transformations have this structure:<\/p>\n<p><!-- code formatted by http:\/\/manoli.net\/csharpformat\/ --><\/p>\n<pre class=\"csharpcode\">      \r\n<span class=\"kwrd\">&lt;<\/span><span class=\"html\">ClaimsTransformation<\/span> <span class=\"attr\">Id<\/span><span class=\"kwrd\">=\"[Name of the transformation in your policy]\"<\/span> <span class=\"attr\">TransformationMethod<\/span><span class=\"kwrd\">=\"[Type of transformation]\"<\/span><span class=\"kwrd\">&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputClaims<\/span><span class=\"kwrd\">&gt;<\/span>\r\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputClaim<\/span> <span class=\"attr\">ClaimTypeReferenceId<\/span><span class=\"kwrd\">=\"[Claim name in your policy schema]\"<\/span> <span class=\"attr\">TransformationClaimType<\/span><span class=\"kwrd\">=\"[Claim name in the transformation]\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">InputClaims<\/span><span class=\"kwrd\">&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputParameters<\/span><span class=\"kwrd\">&gt;<\/span>\r\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">InputParameter<\/span> <span class=\"attr\">Id<\/span><span class=\"kwrd\">=\"[Parameter name in the transformation]\"<\/span> <span class=\"attr\">DataType<\/span><span class=\"kwrd\">=\"[Some primitive type]\"<\/span> <span class=\"attr\">Value<\/span><span class=\"kwrd\">=\"[The value of the parameter]\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">InputParameters<\/span><span class=\"kwrd\">&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;<\/span><span class=\"html\">OutputClaims<\/span><span class=\"kwrd\">&gt;<\/span>\r\n          <span class=\"kwrd\">&lt;<\/span><span class=\"html\">OutputClaim<\/span> <span class=\"attr\">ClaimTypeReferenceId<\/span><span class=\"kwrd\">=\"[Claim name in your policy schema]\"<\/span> <span class=\"attr\">TransformationClaimType<\/span><span class=\"kwrd\">=\"Claim name in the transformation]\"<\/span> <span class=\"kwrd\">\/&gt;<\/span>\r\n        <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">OutputClaims<\/span><span class=\"kwrd\">&gt;<\/span>\r\n      <span class=\"kwrd\">&lt;\/<\/span><span class=\"html\">ClaimsTransformation<\/span><span class=\"kwrd\">&gt;<\/span>\r\n<\/pre>\n<p>Different transformation methods\u00a0call for different input claims, parameters and output claims.<\/p>\n<p>Currently available transformation types are listed here and the detail pages\u00a0explain the claims exchanged and contain concrete examples:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.identityblog.com\/?page_id=1434\">HashTransformation<\/a><\/li>\n<li><a href=\"https:\/\/www.identityblog.com\/?page_id=1460\">EqualityTransformation<\/a><\/li>\n<li><a href=\"https:\/\/www.identityblog.com\/?page_id=1468\">ClaimToClaimEqualityTransformation<\/a><\/li>\n<li><a href=\"https:\/\/www.identityblog.com\/?page_id=1473\">FormatStringClaimTransformation<\/a><\/li>\n<li><a href=\"https:\/\/www.identityblog.com\/?page_id=1479\">FormatStringMultipleClaimsTransformation<\/a><\/li>\n<li><a href=\"https:\/\/www.identityblog.com\/?page_id=1483\">CreateAlternativeSecurityIdTransformation<\/a><\/li>\n<li>GetClaimFromJsonTransformation<\/li>\n<li>GuidAndRandomGeneratorTransformation<\/li>\n<li>InjectDateOfBirthTransformation<\/li>\n<li>IsAgeOverTransformation<\/li>\n<li>NullClaimTransformation<\/li>\n<li>PseudonymousIdentifierTransformation<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A claims transformation converts one or more &#8216;input claims&#8217; into an &#8216;output claim&#8217;. There are a number of different claims transformations supported in AAD B2C, and new transformations types will be added as required. Sometimes it is helpful to have some constant defined in the policy that is used as part of the transformation.\u00a0 This &hellip; <a href=\"https:\/\/www.identityblog.com\/?page_id=1453\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Claims Transformations<\/span><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages\/1453"}],"collection":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1453"}],"version-history":[{"count":12,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages\/1453\/revisions"}],"predecessor-version":[{"id":1486,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/pages\/1453\/revisions\/1486"}],"wp:attachment":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}