This issue has been created
 
 
OpenId Connect / cid:jira-generated-image-avatar-9a354636-0044-4a39-88e9-5916163d1376 OIDC-277 Open

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

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-b20eab77-87f4-496d-9680-4c9fe57df7b4 Simpel created this issue on 12/Mar/26 15:39
 
Summary: Set log level to debug if missing avatar file instead of warn
Issue Type: cid:jira-generated-image-avatar-9a354636-0044-4a39-88e9-5916163d1376 Improvement
Affects Versions: 2.20.1
Assignee: Unassigned
Created: 12/Mar/26 15:39
Priority: cid:jira-generated-image-static-major-dd7743c9-9190-4887-8fff-629b47e80a6e Major
Reporter: Simpel
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.