Hi,<br><br>I have implemented a customized LoginModule, which is used by IdP to do the real authentication. This part is working now. Next part I want to do is put the username into Assertion and release it to SP.<br><br>I know that the best way to do is implementing a customized DataConnector, but I am wondering whether it is possible to eliminate this, since all the IdP will expose is just a &quot;username&quot;. The username is just a principal name which is already available after user login.<br>

<br>My question is in the attribute-resolver.xml, how can I configure it to get the principal name and put into an attribute?<br><br>I am looking for something like:<br><br>&lt;resolver:AttributeDefinition xsi:type=&quot;ad:Simple&quot; id=&quot;username&quot; sourceAttributeID=&quot;$PrincipalName$&quot;&gt;<br>

        &lt;resolver:AttributeEncoder xsi:type=&quot;enc:SAML1String&quot; name=&quot;urn:mace:dir:attribute-def:mail&quot; /&gt;<br>        &lt;resolver:AttributeEncoder xsi:type=&quot;enc:SAML2String&quot; xmlns=&quot;urn:mace:shibboleth:2.0:attribute:encoder&quot;/&gt;<br>

    &lt;/resolver:AttributeDefinition&gt;<br><br>Is that feasible?<br><br>Best,<br clear="all">Yaowen<br>