mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AzureAD: Fallback to no groups if user does not have permission to query groups from azure (#49506)
* If GroupMemver.Read.All permissions is not configured return no groups * fix log
This commit is contained in:
parent
4124294011
commit
624f8ef40d
@ -213,7 +213,8 @@ func extractGroups(client *http.Client, claims azureClaims, token *oauth2.Token)
|
|||||||
|
|
||||||
if res.StatusCode != http.StatusOK {
|
if res.StatusCode != http.StatusOK {
|
||||||
if res.StatusCode == http.StatusForbidden {
|
if res.StatusCode == http.StatusForbidden {
|
||||||
logger.Error("AzureAD OAuth: failed to fetch user groups. Token need User.Read and GroupMember.Read.All permission")
|
logger.Warn("AzureAD OAuh: Token need GroupMember.Read.All permission to fetch all groups")
|
||||||
|
return []string{}, nil
|
||||||
}
|
}
|
||||||
return nil, errors.New("error fetching groups")
|
return nil, errors.New("error fetching groups")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user