I'm trying to get the names of Group Azure AD, Inside token after Azure Login (openId) I receive group IDs in json But I need Groups names.
Json after login:
trying to use GraphService At Azure portal, create a secret key but when I put these key in AuthenticationHeaderValue my code brokes.
var graphServiceClientGr = new GraphServiceClient(new DelegateAuthenticationProvider((requestMessage) => {
requestMessage
.Headers
.Authorization = new AuthenticationHeaderValue("Bearer", token);
return Task.FromResult(0);
}));
My var "token" is the same token which i receive after login, and which have claims inside.
At inner exception i receive:
"Access token validation failure. Invalid audience"
What are the correct parameter i should to put in authentication?
AFter these invocation How i receive the name of GROUP? Any suggestions to do that? I don't need role applications Names because i need group AD Names
I think to try with the next line, but i don't know if inside these object I receive names of groups.
In these line, i expect to receive name of groups of these user, who correspon to these login token Groups
or with these line: