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__(
283283 "passphrase": "Passphrase if the private_key is encrypted (Optional. Added in version 1.6.0)",
284284 }
285285
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+
286290 :type client_credential: Union[dict, str]
287291
288292 :param dict client_claims:
Original file line number Diff line number Diff line change 88# Alternatively, use "https://login.microsoftonline.com/common" for multi-tenant app.
99AUTHORITY=<authority url>
1010
11- # The following variables are required for the app to run.
1211CLIENT_ID=<client id>
1312
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>
1620
1721# Multiple scopes can be added into the same line, separated by a space.
1822# Here we use a Microsoft Graph API as an example
Original file line number Diff line number Diff line change 44# configure AUTHORITY as https://contoso.ciamlogin.com/contoso.onmicrosoft.com
55AUTHORITY=<authority url>
66
7- # The following variables are required for the app to run.
87CLIENT_ID=<client id>
98
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>
1216
1317# Multiple scopes can be added into the same line, separated by a space.
1418# Here we use a Microsoft Graph API as an example
Original file line number Diff line number Diff line change 55# "https://www.contoso.com/TENANT_GUID/v2.0"
66OIDC_AUTHORITY=<authority url>
77
8- # The following variables are required for the app to run.
98CLIENT_ID=<client id>
109
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>
1317
1418# Multiple scopes can be added into the same line, separated by a space.
1519# 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 4343 os .getenv ('CLIENT_ID' ),
4444 authority = os .getenv ('AUTHORITY' ), # For Entra ID or External ID
4545 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
4748 token_cache = global_token_cache , # Let this app (re)use an existing token cache.
4849 # If absent, ClientApplication will create its own empty token cache
4950 )
You can’t perform that action at this time.
0 commit comments