diff --git a/providers/ms_entra_id.go b/providers/ms_entra_id.go index f911e35e..a76b8636 100644 --- a/providers/ms_entra_id.go +++ b/providers/ms_entra_id.go @@ -271,6 +271,8 @@ func (p *MicrosoftEntraIDProvider) getTenantFromToken(session *sessions.SessionS return "", fmt.Errorf("unable to get claim extractor: %v", err) } + // Use tenant id (tid) provided within the payload claims of the id token + // https://learn.microsoft.com/en-us/entra/identity-platform/id-token-claims-reference value, exists, err := extractor.GetClaim("tid") if exists && err == nil {