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(
23
23
scopes = ["https://graph.microsoft.com/.default" ], # Microsoft Graph
24
24
** kwargs ):
25
25
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 ())
28
34
redirect_uri = "http://localhost:%d" % port
29
35
ac = obtain_auth_code (port , auth_uri = app .get_authorization_request_url (
30
36
scopes , redirect_uri = redirect_uri , ** kwargs ))
You can’t perform that action at this time.
0 commit comments