diff --git a/authentik/sources/oauth/clients/base.py b/authentik/sources/oauth/clients/base.py index 33e05d2be..25f8671db 100644 --- a/authentik/sources/oauth/clients/base.py +++ b/authentik/sources/oauth/clients/base.py @@ -44,7 +44,7 @@ class BaseOAuthClient: response = self.do_request("get", profile_url, token=token) response.raise_for_status() except RequestException as exc: - LOGGER.warning("Unable to fetch user profile", exc=exc) + LOGGER.warning("Unable to fetch user profile", exc=exc, body=response.text) return None else: return response.json() diff --git a/authentik/sources/oauth/types/azure_ad.py b/authentik/sources/oauth/types/azure_ad.py index 02d0d18bf..951822398 100644 --- a/authentik/sources/oauth/types/azure_ad.py +++ b/authentik/sources/oauth/types/azure_ad.py @@ -37,7 +37,7 @@ class AzureADClient(OAuth2Client): ) response.raise_for_status() except RequestException as exc: - LOGGER.warning("Unable to fetch user profile", exc=exc) + LOGGER.warning("Unable to fetch user profile", exc=exc, body=response.text) return None else: return response.json() diff --git a/authentik/sources/oauth/types/mailcow.py b/authentik/sources/oauth/types/mailcow.py index 55bd5cc75..a296b9efa 100644 --- a/authentik/sources/oauth/types/mailcow.py +++ b/authentik/sources/oauth/types/mailcow.py @@ -36,7 +36,7 @@ class MailcowOAuth2Client(OAuth2Client): ) response.raise_for_status() except RequestException as exc: - LOGGER.warning("Unable to fetch user profile", exc=exc) + LOGGER.warning("Unable to fetch user profile", exc=exc, body=response.text) return None else: return response.json()