File tree Expand file tree Collapse file tree 6 files changed +27
-90
lines changed Expand file tree Collapse file tree 6 files changed +27
-90
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,10 @@ def __init__(
283
283
"passphrase": "Passphrase if the private_key is encrypted (Optional. Added in version 1.6.0)",
284
284
}
285
285
286
+ The following command will generate a .pfx file from your .key and .pem file::
287
+
288
+ openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.pem
289
+
286
290
:type client_credential: Union[dict, str]
287
291
288
292
:param dict client_claims:
Original file line number Diff line number Diff line change 8
8
# Alternatively, use "https://login.microsoftonline.com/common" for multi-tenant app.
9
9
AUTHORITY=<authority url>
10
10
11
- # The following variables are required for the app to run.
12
11
CLIENT_ID=<client id>
13
12
14
- # Leave it empty if you are using a public client which has no client secret.
15
- CLIENT_SECRET=<client secret>
13
+ # Uncomment the following setting if you are using a confidential client
14
+ # which has a client secret. Example value: your password
15
+ #CLIENT_SECRET=<client secret>
16
+
17
+ # Configure this if you are using a confidential client which has a client credential.
18
+ # Example value: {"private_key_pfx_path": "/path/to/your.pfx"}
19
+ CLIENT_CREDENTIAL_JSON=<client credential json>
16
20
17
21
# Multiple scopes can be added into the same line, separated by a space.
18
22
# Here we use a Microsoft Graph API as an example
Original file line number Diff line number Diff line change 4
4
# configure AUTHORITY as https://contoso.ciamlogin.com/contoso.onmicrosoft.com
5
5
AUTHORITY=<authority url>
6
6
7
- # The following variables are required for the app to run.
8
7
CLIENT_ID=<client id>
9
8
10
- # Leave it empty if you are using a public client which has no client secret.
11
- CLIENT_SECRET=<client secret>
9
+ # Uncomment the following setting if you are using a confidential client
10
+ # which has a client secret. Example value: your password
11
+ #CLIENT_SECRET=<client secret>
12
+
13
+ # Configure this if you are using a confidential client which has a client credential.
14
+ # Example value: {"private_key_pfx_path": "/path/to/your.pfx"}
15
+ CLIENT_CREDENTIAL_JSON=<client credential json>
12
16
13
17
# Multiple scopes can be added into the same line, separated by a space.
14
18
# Here we use a Microsoft Graph API as an example
Original file line number Diff line number Diff line change 5
5
# "https://www.contoso.com/TENANT_GUID/v2.0"
6
6
OIDC_AUTHORITY=<authority url>
7
7
8
- # The following variables are required for the app to run.
9
8
CLIENT_ID=<client id>
10
9
11
- # Leave it empty if you are using a public client which has no client secret.
12
- CLIENT_SECRET=<client secret>
10
+ # Uncomment the following setting if you are using a confidential client
11
+ # which has a client secret. Example value: your password
12
+ #CLIENT_SECRET=<client secret>
13
+
14
+ # Configure this if you are using a confidential client which has a client credential.
15
+ # Example value: {"private_key_pfx_path": "/path/to/your.pfx"}
16
+ CLIENT_CREDENTIAL_JSON=<client credential json>
13
17
14
18
# Multiple scopes can be added into the same line, separated by a space.
15
19
# Here we use a Microsoft Graph API as an example
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 43
43
os .getenv ('CLIENT_ID' ),
44
44
authority = os .getenv ('AUTHORITY' ), # For Entra ID or External ID
45
45
oidc_authority = os .getenv ('OIDC_AUTHORITY' ), # For External ID with custom domain
46
- client_credential = os .getenv ('CLIENT_SECRET' ),
46
+ client_credential = os .getenv ('CLIENT_SECRET' ) # ENV VAR contains a quotation mark-less string
47
+ or json .loads (os .getenv ('CLIENT_CREDENTIAL_JSON' )), # ENV VAR contains a JSON blob as a string
47
48
token_cache = global_token_cache , # Let this app (re)use an existing token cache.
48
49
# If absent, ClientApplication will create its own empty token cache
49
50
)
You can’t perform that action at this time.
0 commit comments