I need help in figuring out how I can get a user's assigned groups via OpenID Connect over ADFS (Windows Server 2016). I am currently able to authenticate a user and get the user info including the access_token. When I inspect the JWT-token I can see all of the default claims in there. What I want is to add all of the users' assigned system groups to the claims as an array of strings, but I have no idea of how to accomplish this. ADFS and Windows Server is a beast and all of the search results from Google is not leading me in the right direction. All of the articles I find is kinda useless since they're either incomplete in the steps or hard to follow if you're not educated in the whole ADFS-shebang.
I have been stuck at this problem for a couple of days now and need some help, hopefully there's someone out there with knowledge about this.
What I've done so far:
- I have added an application group to ADFS which contains a "Server Application" and a "Web API".
- I have added a user group called Admin and assigned that to a user called max.
- I can login through OpenID Connect over ADFS and get the user info from the userinfo-endpoint.
- I have been able to decode the access_token to access the claims.
I'm currently authenticating with the scopes "openid", "email" and "profile".