Sync the avatar from Entra ID on login - #72
Open
stevetemple wants to merge 10 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in feature to sync a user’s Microsoft Entra ID (Azure AD) profile photo into Umbraco as the backoffice avatar during login, via Microsoft Graph.
Changes:
- Introduces
SetProfileImageOnLoginconfiguration flag (defaultfalse) across configuration/settings/schema. - Requests
User.Readscope (and saves tokens) when enabled, then fetches/me/photo/$valueand writes it to the Umbraco media file system as the user avatar. - Documents the new setting across versioned READMEs.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Umbraco.Community.AzureSSO/Settings/AzureSSOSettings.cs | Exposes SetProfileImageOnLogin in profile settings. |
| src/Umbraco.Community.AzureSSO/MicrosoftAccountBackOfficeExternalLoginProviderOptions.cs | Implements profile photo fetch + avatar persistence on external login. |
| src/Umbraco.Community.AzureSSO/MicrosoftAccountAuthenticationExtensions.cs | Adds conditional Graph scope and enables SaveTokens when profile photo sync is enabled. |
| src/Umbraco.Community.AzureSSO/AzureSSOConfiguration.cs | Adds configuration property and includes it in “all values empty” detection. |
| src/Umbraco.Community.AzureSSO/appsettings-schema.UmbracoCommunityAzureSSO.json | Documents the new SetProfileImageOnLogin setting in the schema. |
| src/.editorconfig | Updates comment/formatting in editorconfig (line ending comment + whitespace). |
| README-v15plus.md | Documents Profile Photo feature and setting behavior. |
| README-v14plus.md | Documents Profile Photo feature and setting behavior. |
| README-v13.md | Documents Profile Photo feature and setting behavior. |
| README-uptov12.md | Documents Profile Photo feature and setting behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
stevetemple
marked this pull request as draft
July 28, 2026 13:07
- Register IHttpClientFactory only when SetProfileImageOnLogin is enabled, since the package otherwise assumes the host app has registered it - Derive the saved avatar's file extension from the Graph response Content-Type instead of assuming jpg, and hash the filename with SHA256 instead of SHA1 - Treat a 404 from the photo endpoint as "no photo set" (silent) and log a warning for other failure statuses, matching the README wording
stevetemple
marked this pull request as ready for review
July 30, 2026 13:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Fetch Azure profile image to use as avatar in Umbraco
Link to issue
#11
Checklist before requesting a review