Uploaded image for project: 'OpenId Connect'
  1. OpenId Connect
  2. OIDC-277

Set log level to debug if missing avatar file instead of warn

    XMLWordPrintable

Details

    • Unknown

    Description

      I see warnings in the logfile like:

      2026-03-11 14:57:36,730 [https-jsse-nio-8443-exec-1 - https://example.org/oidc/authenticator/callback?code=SNIP&session_state=SNIP] WARN  o.x.c.o.a.i.OIDCUserManager    - Failed to get user avatar from URL [https://graph.microsoft.com/v1.0/me/photo/$value]: FileNotFoundException: https://graph.microsoft.com/v1.0/me/photo/$value 

      I found [this in the oidc code|https://github.com/xwiki-contrib/oidc/blob/baa0573f75b4375e8af2973de0680e9cda388b00/oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCUserManager.java#L401-L435 where the exception is raised.

      Microsoft should not give a URL (one that seems broken by the way) to download the avatar if the user does not have an avatar in the first place…

      After a short chat in https://forum.xwiki.org/t/oidc-warning-failed-to-get-user-avatar-from-url/18297 I would agree that it is useful to set the log level to debug to not spam the log file with these exceptions.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            Simpel Simpel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: