Auth: Add org to role mappings support to AzureAD/Entra integration (#88861)
* Added implementation and tests * Add docs, simplify implementation * Remove unused func * Update docs
This commit is contained in:
@@ -168,8 +168,8 @@ func (c *OAuth) Authenticate(ctx context.Context, r *authn.Request) (*authn.Iden
|
||||
|
||||
// This is required to implement OrgRole mapping for OAuth providers step by step
|
||||
switch c.providerName {
|
||||
case social.GenericOAuthProviderName, social.GitHubProviderName,
|
||||
social.GitlabProviderName, social.OktaProviderName, social.GoogleProviderName:
|
||||
case social.GenericOAuthProviderName, social.GitHubProviderName, social.GitlabProviderName,
|
||||
social.OktaProviderName, social.GoogleProviderName, social.AzureADProviderName:
|
||||
// Do nothing, these providers already supports OrgRole mapping
|
||||
default:
|
||||
userInfo.OrgRoles, userInfo.IsGrafanaAdmin, _ = getRoles(c.cfg, func() (org.RoleType, *bool, error) {
|
||||
|
||||
Reference in New Issue
Block a user