Unexpected NameID in SAML Response when user is from domain that connected by ad-ldap connector

I have on-premise active directory domain with installed auth0 connector and application with SAML authentication in auth0 tenant. And my problem is that I get in SAML Response NameId section in next format:
<saml:NameID Format=“urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified”>ad|[domainname]|[userPrincipalName]</saml:NameID>
But I need to get only userPrincipalName without additional information like domain name and connector type! How I can achieve that?

Profiler map:
module.exports = function (raw_data) {
var profile = {
id: raw_data[‘userPrincipalName’],
displayName: raw_data.displayName,
name: {
familyName: raw_data.sn,
givenName: raw_data.givenName
},
nickname: raw_data[‘userPrincipalName’],
groups: raw_data[‘groups’],
emails: (raw_data.mail ? [{value: raw_data.mail }] : undefined)
};

profile[‘dn’] = raw_data[‘dn’];
profile[‘st’] = raw_data[‘st’];
profile[‘description’] = raw_data[‘description’];
profile[‘postalCode’] = raw_data[‘postalCode’];
profile[‘telephoneNumber’] = raw_data[‘telephoneNumber’];
profile[‘distinguishedName’] = raw_data[‘distinguishedName’];
profile[‘co’] = raw_data[‘co’];
profile[‘department’] = raw_data[‘department’];
profile[‘company’] = raw_data[‘company’];
profile[‘mailNickname’] = raw_data[‘mailNickname’];
profile[‘sAMAccountName’] = raw_data[‘sAMAccountName’];
profile[‘sAMAccountType’] = raw_data[‘sAMAccountType’];
profile[‘userPrincipalName’] = raw_data[‘userPrincipalName’];
profile[‘manager’] = raw_data[‘manager’];
profile[‘organizationUnits’] = raw_data[‘organizationUnits’];

return profile;
};

SAML Settings:
{
“mappings”: {
“user_id”: “http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn
},
“nameIdentifierProbes”: [
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn
]
}

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?