@@ -692,14 +692,16 @@ def _test_acquire_token_obo(self, config_pca, config_cca,
692692 result = cca .acquire_token_silent (config_cca ["scope" ], account )
693693 self .assertEqual (cca_result ["access_token" ], result ["access_token" ])
694694
695- def _test_acquire_token_by_client_secret (
696- self , client_id = None , client_secret = None , authority = None , scope = None ,
695+ def _test_acquire_token_for_client (
696+ self , client_id = None , client_credential = None , authority = None , scope = None ,
697697 oidc_authority = None ,
698698 ** ignored ):
699- assert client_id and client_secret and scope and (
699+ assert client_id and client_credential and scope and (
700700 authority or oidc_authority )
701701 self .app = msal .ConfidentialClientApplication (
702- client_id , client_credential = client_secret , authority = authority ,
702+ client_id ,
703+ client_credential = client_credential ,
704+ authority = authority ,
703705 oidc_authority = oidc_authority ,
704706 http_client = MinimalHttpClient ())
705707 result = self .app .acquire_token_for_client (scope )
@@ -936,9 +938,9 @@ def test_acquire_token_by_client_secret(self):
936938 # Vastly different than ArlingtonCloudTestCase.test_acquire_token_by_client_secret()
937939 _app = self .get_lab_app_object (
938940 publicClient = "no" , signinAudience = "AzureAdMyOrg" )
939- self ._test_acquire_token_by_client_secret (
941+ self ._test_acquire_token_for_client (
940942 client_id = _app ["appId" ],
941- client_secret = self .get_lab_user_secret (
943+ client_credential = self .get_lab_user_secret (
942944 _app ["clientSecret" ].split ("/" )[- 1 ]),
943945 authority = "{}{}.onmicrosoft.com" .format (
944946 _app ["authority" ], _app ["labName" ].lower ().rstrip (".com" )),
@@ -1047,9 +1049,9 @@ def test_ciam_acquire_token_for_client(self):
10471049 else : # Ciam6 era has a URL path that ends with the secret name
10481050 secret_name = secret_url .path .split ("/" )[- 1 ]
10491051 logger .info ('Detected secret name "%s" from "%s"' , secret_name , raw_url )
1050- self ._test_acquire_token_by_client_secret (
1052+ self ._test_acquire_token_for_client (
10511053 client_id = self .app_config ["appId" ],
1052- client_secret = self .get_lab_user_secret (secret_name ),
1054+ client_credential = self .get_lab_user_secret (secret_name ),
10531055 authority = self .app_config .get ("authority" ),
10541056 oidc_authority = self .app_config .get ("oidc_authority" ),
10551057 scope = self .app_config ["scopes" ], # It shall ends with "/.default"
@@ -1212,8 +1214,8 @@ def test_acquire_token_by_ropc(self):
12121214
12131215 def test_acquire_token_by_client_secret (self ):
12141216 config = self .get_lab_user (usertype = "cloud" , azureenvironment = self .environment , publicClient = "no" )
1215- config ["client_secret " ] = self .get_lab_user_secret ("ARLMSIDLAB1-IDLASBS-App-CC-Secret" )
1216- self ._test_acquire_token_by_client_secret (** config )
1217+ config ["client_credential " ] = self .get_lab_user_secret ("ARLMSIDLAB1-IDLASBS-App-CC-Secret" )
1218+ self ._test_acquire_token_for_client (** config )
12171219
12181220 def test_acquire_token_obo (self ):
12191221 config_cca = self .get_lab_user (
0 commit comments