Skip to content

Commit 2d4134e

Browse files
committed
AuthPowerBI env vars v3
1 parent ab5183f commit 2d4134e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,10 +1080,11 @@ def logout_user(request):
10801080
def _pbi_token_via_managed_identity() -> str | None:
10811081
"""
10821082
Acquire an AAD access token for Power BI using the AKS managed identity.
1083-
If AZURE_CLIENT_ID is provided, target that user-assigned MI.
1083+
If POWERBI_AZURE_CLIENT_ID is provided, target that user-assigned MI.
1084+
(There is another AZURE_CLIENT_ID among env vars, that is why this distinctive name is used.)
10841085
"""
10851086
try:
1086-
client_id = getattr(settings, "AZURE_CLIENT_ID", None) or os.getenv("AZURE_CLIENT_ID")
1087+
client_id = getattr(settings, "POWERBI_AZURE_CLIENT_ID", None) or os.getenv("POWERBI_AZURE_CLIENT_ID")
10871088
if client_id:
10881089
cred = ManagedIdentityCredential(client_id=client_id)
10891090
else:

0 commit comments

Comments
 (0)