I think there is a problem with your description. You said in the question: and the app is member in an AD Group. As far as I know, the members of a group can only be users, organization contacts, service leaders or other groups, and there is no application.
I think what you want to say is that you assigned users or groups to the application (please correct me if my understanding is wrong), like this:
As far as I know, there is no group claim for application tokens(The user token has a group claim, as you said in the question),because application is not a member of group.
If you want to get the group assigned to the application, MS graph api is a good choice:
https://graph.microsoft.com/beta/servicePrincipals/{id}/appRoleAssignedTo
You need to replace {id}
with Object ID
:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…