1

i have tried to get user group name as value in auth/me URL, but it returns only objectId of group. How to get the group name instead of objectId.

In my manifest i have added

"groupMembershipClaims": "SecurityGroup"

optional claims also added

i don't have any onpremises AD connect I need the manifest configuration to get the group name in auth/me url

Aravind S
  • 11
  • 1
  • You can get the all the default properties of group using the Microsoft graph: https://learn.microsoft.com/en-us/graph/api/group-get?view=graph-rest-1.0&tabs=http#example-1-return-all-default-properties – Mehtab Siddique Nov 08 '22 at 07:41

2 Answers2

3

I have tried this in my lab and it is working for me. This option is available only if you select "groups assigned to the application" option.

If you select any other option apart from this, "cloud-only group display names (preview)" it will be greyed out.

enter image description here

Since this option is still in preview, there is some enhancements going on at backend.

For more information, you can also refer this documentation Configure group claims for applications.

VenkateshDodda
  • 4,723
  • 1
  • 3
  • 12
0

I tried to reproduce the same in my environment:

enter image description here

Manifest:

enter image description here

"given_name": "kav",
  "groups": [
    "xxxf-94bc-xxxxxx7d",
    "xxxx-2459exx5a"
  ],
 

The jwt cannot contain group name but it gets Id’s of the groups

You can customize group claim name following Configure group claims but it required Onpremise AD which you mentioned is not there as sAMAccountName option is the option present on Group objects synced from Active Directory.

Else You can check all the default properties using Microsoft graph Api Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph

https://graph.microsoft.com/v1.0/groups/<groupId>

enter image description here

kavyaS
  • 8,026
  • 1
  • 7
  • 19