2

I'm using sitecore 9.1. I've implemented an IdentityProvidersProcessor using Microsoft.Owin.Security to authenticate users. I've added my transformations in a config file as below.

  <!--list of identity transfromations which are applied to the provider when a user signin-->
      <transformations hint="list:AddTransformation">
        <!--SetIdpClaim transformation-->
       <transformation name="set idp claim" ref="federatedAuthentication/sharedTransformations/transformation[@name='set idp claim']" />
         <transformation name="Name Identifier Claim" type="Sitecore.Owin.Authentication.Services.DefaultTransformation, Sitecore.Owin.Authentication">
          <sources hint="raw:AddSource">
            <claim name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" />
          </sources>
          <targets hint="raw:AddTarget">
            <claim name="FullName" />
          </targets>
          <keepSource>true</keepSource>
        </transformation>
      </transformations>
    </identityProvider>
  </identityProviders>

I have also specified externalUserBuilder node in my config file and specified my custom ExternalUserBuilder class. I Also added List of property mappings, to map claims into user properties.

When debugging i find the transformations are read as shown in the below screenshots. However the user custom properties are never read which, i guess, means they were not mapped correctly.

enter image description here

enter image description here

When debugging i also find that the sitecore context user is always extranet/anonymous, and the http context user in null! which means that the custom externaluserbuilder is not run successfully.

I'm not sure when is the Custom externalUserBuilder is actually called!

enter image description here

Any idea what i might be missing here?

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.