Skip to content

Commit

Permalink
Use .default for all resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed-Maeng committed Sep 10, 2024
1 parent 4c0564c commit 28e22a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DeploymentCloud/Deployment.Common/scripts/msalmsiserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def _acquire_token(self, resource):
client_credential={"private_key": key, "thumbprint": thumbprint}
)

# Ensure resource ends with "/.default"
if not resource.endswith("/.default"):
resource += "/.default"

auth_result = app.acquire_token_for_client(scopes=[resource])

res = ManagedIdentityTokenResponse()
Expand Down

0 comments on commit 28e22a3

Please sign in to comment.