File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -511,6 +511,7 @@ def __init__(
511
511
# Here the self.authority will not be the same type as authority in input
512
512
if oidc_authority and authority :
513
513
raise ValueError ("You can not provide both authority and oidc_authority" )
514
+ self ._oidc_authority = oidc_authority
514
515
try :
515
516
authority_to_use = authority or "https://{}/common/" .format (WORLD_WIDE )
516
517
self .authority = Authority (
@@ -973,6 +974,11 @@ def authorize(): # A controller in a web app
973
974
** kwargs ))
974
975
if "access_token" in response :
975
976
response [self ._TOKEN_SOURCE ] = self ._TOKEN_SOURCE_IDP
977
+ if ("AADSTS500207" in response .get ("error_description" , "" ) and
978
+ self ._oidc_authority and not self ._oidc_authority .endswith ("/v2.0" )):
979
+ response ["error_description" ] = (
980
+ 'Did you forget to append "/v2.0" to your oidc_authority? '
981
+ + response ["error_description" ])
976
982
telemetry_context .update_telemetry (response )
977
983
return response
978
984
You can’t perform that action at this time.
0 commit comments