0

hi I created the custom claim for that so please check the below claim which is created by me:

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] =] issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"), query = "(&(objectClass=user)(objectCategory=person));mail,givenName;{0}", param = c.Value);

But in this case, I got all emails in an outgoing claim (http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress ), Also get all the givenname in another outgoing claim (http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname).

Please check the below Screenshot of how I got the values of email and name right now from the adfs using code of C#. https://learn.microsoft.com/en-us/answers/storage/attachments/137282-image.png

But I need in a single outgoing claim like email= abc@gmail.com, Givenname=abc (with any comma separate or any separator), I need both email and given name in one single outgoing claim.

I already generate this same in the Microsoft Ignite forum: https://learn.microsoft.com/en-us/answers/questions/566015/how-to-get-all-users-of-adfs-with-all-attributes-e.html

Can you please help me to get all user's details from adfs using windows account login and get all user's details?

Thanks

Bhavdip
  • 44
  • 1
  • 9

1 Answers1

0

You can't out of the box.

That's not how claims work.

You could use a custom attribute store.

You could also combine the claims into a single type.

See this under "Combining Claim Values".

rbrayb
  • 46,440
  • 34
  • 114
  • 174
  • I check this link ( custom attribute store.) but there is create an attribute with its value so basically, I don't add any value on that but I need to get value from the ADFS. so its set data in attribute and then get from that attribute but I dont need to set I just get all users from adfs after windowsaccount authentication. Please check this link : https://www.geeksforgeeks.org/custom-attributes-in-c-sharp/ – Bhavdip Oct 13 '21 at 06:25
  • Your question was about combing two claims into a single one. You pass both into the custom store, join them and pass the combined result back. – rbrayb Oct 13 '21 at 19:40