File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,14 @@ def _get_app_and_auth_code(
2323 scopes = ["https://graph.microsoft.com/.default" ], # Microsoft Graph
2424 ** kwargs ):
2525 from msal .oauth2cli .authcode import obtain_auth_code
26- app = msal .ClientApplication (
27- client_id , client_secret , authority = authority , http_client = MinimalHttpClient ())
26+ if client_secret :
27+ app = msal .ConfidentialClientApplication (
28+ client_id ,
29+ client_credential = client_secret ,
30+ authority = authority , http_client = MinimalHttpClient ())
31+ else :
32+ app = msal .PublicClientApplication (
33+ client_id , authority = authority , http_client = MinimalHttpClient ())
2834 redirect_uri = "http://localhost:%d" % port
2935 ac = obtain_auth_code (port , auth_uri = app .get_authorization_request_url (
3036 scopes , redirect_uri = redirect_uri , ** kwargs ))
You can’t perform that action at this time.
0 commit comments