diff --git a/libraries/microsoft-agents-authentication-msal/microsoft_agents/authentication/msal/msal_auth.py b/libraries/microsoft-agents-authentication-msal/microsoft_agents/authentication/msal/msal_auth.py index 81619e58..2fc9f1c4 100644 --- a/libraries/microsoft-agents-authentication-msal/microsoft_agents/authentication/msal/msal_auth.py +++ b/libraries/microsoft-agents-authentication-msal/microsoft_agents/authentication/msal/msal_auth.py @@ -146,9 +146,7 @@ async def acquire_token_on_behalf_of( ) if "access_token" not in token: - logger.error( - f"Failed to acquire token on behalf of user: {user_assertion}" - ) + logger.error(f"Failed to acquire token on behalf of user.") raise ValueError( authentication_errors.FailedToAcquireToken.format(str(token)) ) diff --git a/libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/_oauth/_oauth_flow.py b/libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/_oauth/_oauth_flow.py index d886d40e..27ae4a96 100644 --- a/libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/_oauth/_oauth_flow.py +++ b/libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/_oauth/_oauth_flow.py @@ -126,7 +126,7 @@ async def get_user_token(self, magic_code: str | None = None) -> TokenResponse: magic_code=magic_code, ) if token_response: - logger.info("User token obtained successfully: %s", token_response) + logger.info("User token obtained successfully") self._flow_state.expiration = ( datetime.now(timezone.utc).timestamp() + self._default_flow_duration ) @@ -315,10 +315,7 @@ async def continue_flow(self, activity: Activity) -> _FlowResponse: self._flow_state.expiration = ( datetime.now(timezone.utc).timestamp() + self._default_flow_duration ) - logger.debug( - "OAuth flow completed successfully, got TokenResponse: %s", - token_response, - ) + logger.debug("OAuth flow completed successfully, got a token response.") return _FlowResponse( flow_state=self._flow_state.model_copy(),