File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -703,14 +703,17 @@ def test_acquire_token_obo(self):
703
703
self ._test_acquire_token_obo (config_pca , config_cca )
704
704
705
705
def test_acquire_token_by_client_secret (self ):
706
- # This is copied from ArlingtonCloudTestCase's same test case
707
- try :
708
- config = self .get_lab_user (usertype = "cloud" , publicClient = "no" )
709
- except requests .exceptions .HTTPError :
710
- self .skipTest ("The lab does not provide confidential app for testing" )
711
- else :
712
- config ["client_secret" ] = self .get_lab_user_secret ("TBD" ) # TODO
713
- self ._test_acquire_token_by_client_secret (** config )
706
+ # Vastly different than ArlingtonCloudTestCase.test_acquire_token_by_client_secret()
707
+ _app = self .get_lab_app_object (
708
+ publicClient = "no" , signinAudience = "AzureAdMyOrg" )
709
+ self ._test_acquire_token_by_client_secret (
710
+ client_id = _app ["appId" ],
711
+ client_secret = self .get_lab_user_secret (
712
+ _app ["clientSecret" ].split ("/" )[- 1 ]),
713
+ authority = "{}{}.onmicrosoft.com" .format (
714
+ _app ["authority" ], _app ["labName" ].lower ().rstrip (".com" )),
715
+ scope = ["https://graph.microsoft.com/.default" ],
716
+ )
714
717
715
718
@unittest .skipUnless (
716
719
os .getenv ("LAB_OBO_CLIENT_SECRET" ),
You can’t perform that action at this time.
0 commit comments