-
Notifications
You must be signed in to change notification settings - Fork 3.2k
{Auth} Enable PII log for WAM #28954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
️✔️AzureCLI-FullTest
|
Hi @jiasli, |
️✔️AzureCLI-BreakingChangeTest
|
Enable PII log for troubleshooting purpose |
return {**self._msal_app_kwargs, "enable_broker_on_windows": self._enable_broker_on_windows} | ||
return {**self._msal_app_kwargs, | ||
"enable_broker_on_windows": self._enable_broker_on_windows, | ||
"enable_pii_log": True} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I know why not adding this to _msal_app_kwargs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable_pii_log
only affects the WAM flow from PublicClientApplication
:
If adding enable_pii_log
to _msal_app_kwargs
, it will be passed to ConfidentialClientApplication
which doesn't support WAM at all.
self._decide_broker(allow_broker, enable_pii_log)
def _decide_broker(self, allow_broker, enable_pii_log):
is_confidential_app = self.client_credential or isinstance(
self, ConfidentialClientApplication)
if is_confidential_app and allow_broker:
raise ValueError("allow_broker=True is only supported in PublicClientApplication")
Related command
az login
Description
MSAL hides the original
AADSTS
error when WAM is used (AzureAD/microsoft-authentication-library-for-python#698).This PR uses
enable_pii_log
from AzureAD/microsoft-authentication-library-for-python#590 to print the originalAADSTS
error.We should carefully inspect that no PII is sent to the telemetry before merging this PR.As confirmed by MSAL (AzureAD/microsoft-authentication-library-for-python#590 (comment)),
enable_pii_log
only affects logs, not telemetry. In other words, the telemetry will not contain PII even whenenable_pii_log
is set toTrue
.Testing Guide
Before:
After: