I'm using ADFS and I need to send the sAMAccountName.
Currently using a "Transform an incoming claim" rule: Incoming claim type: Windows account name Outgoing claim type: Name ID Outgoing name ID format: Email (I know the format is actually wrong but thats the format the provider wants and it works)
Unfortunately the username is sent including the domain prefix, so e.g. "domain\username". How can I get rid of "domain"?
I tried with transforming it via
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname"]
=> issue(Type = "sswindowsaccountname", Value = RegexReplace(c.Value, "^Domain\\", ""));
Unfortunately it doesn't work.
Does anybody know how I can resolve that? Thanks!