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__(
511511 # Here the self.authority will not be the same type as authority in input
512512 if oidc_authority and authority :
513513 raise ValueError ("You can not provide both authority and oidc_authority" )
514+ self ._oidc_authority = oidc_authority
514515 try :
515516 authority_to_use = authority or "https://{}/common/" .format (WORLD_WIDE )
516517 self .authority = Authority (
@@ -973,6 +974,11 @@ def authorize(): # A controller in a web app
973974 ** kwargs ))
974975 if "access_token" in response :
975976 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" ])
976982 telemetry_context .update_telemetry (response )
977983 return response
978984
You can’t perform that action at this time.
0 commit comments