You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Azure DevOps pull requests never show profile pictures #24355
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Sign in to Azure CLI with the DevOps extension (az login or az devops login).
Add a project whose remote is an Azure DevOps repository.
Open its pull requests on web, desktop, or mobile.
Expected behavior
Authors and reviewers show their Azure DevOps profile pictures, as GitHub authors do.
Actual behavior
No Azure DevOps author or reviewer ever shows a picture. Web and desktop show the first letter of the name. Mobile shows an empty space where the avatar should be.
The adapter passes Azure's imageUrl straight to the client, for example https://dev.azure.com/acme/_api/_common/identityImage?id=<guid>. That URL only answers a signed-in browser session. A request without one gets a 302 to the Visual Studio sign-in page, so the <img> fails. With a bearer token from az account get-access-token, the same URL returns 200 image/png.
On v0.1.11, Azure DevOps avatars show in the Issues view but not in pull requests. Both render through the same PullRequestActorAvatar, and the server passes Azure's imageUrl through unchanged in both cases. The difference is the URL Azure returns.
MemberAvatars needs no credential at all. I checked it with plain curl against a real organization:
It accepts the bare identity GUID. MemberAvatars/<guid> returns the same bytes as MemberAvatars/<descriptor>, for authors and for reviewers. That matters because reviewers come back with descriptor: null (156 of 156 in one project), while authors carry one. With the GUID form, no lookup is needed for either.
It works on dev.azure.com/<org> and <org>.visualstudio.com, and GUID case does not matter.
Images are 0.3 to 6.5 KB at the default size. ?size=2 returns 115 to 130 KB, so keep the default.
An unknown GUID, a team, or a group returns 404. The client then shows the initial, as it does today for every Azure avatar.
The endpoint is undocumented. Azure itself puts it in work item payloads, and the Issues view already depends on it, so the fix adds no new dependency.
The response sends Cache-Control: no-cache, no-store, so the browser refetches each time. At a few KB per avatar that is fine.
Proposed fix
Add one helper in packages/source-control-azure-devops that rewrites <origin>/_api/_common/identityImage?id=<guid> to <origin>/_apis/GraphProfile/MemberAvatars/<guid>. Leave any other URL as it is. Use it where the adapter reads imageUrl today:
azureDevOpsIssueJson.ts:147, work item identities. These already use MemberAvatars, so the helper leaves them alone. It covers the case where Azure returns the old form.
Plus a unit test for the rewrite. Contracts, web, mobile, and desktop stay as they are. Only the server changes, and because the client loads the image straight from Azure, it works the same in local, remote, and tunnel connections.
#24357 fixes this by fetching the avatar on the server with two az devops invoke calls, caching it, and serving it through fetchMedia and a signed /api/assets URL. It builds on the host media hooks from #23994 and makes cwd optional in the source control media contract. The rewrite above makes all of that unnecessary, so I plan to close #24357 once this lands.
Activity
Tabonx commentedon Nov 20, 2026
Update: a URL rewrite fixes this, no proxy needed
On v0.1.11, Azure DevOps avatars show in the Issues view but not in pull requests. Both render through the same
PullRequestActorAvatar, and the server passes Azure'simageUrlthrough unchanged in both cases. The difference is the URL Azure returns.System.AssignedToand others)https://dev.azure.com/<org>/_apis/GraphProfile/MemberAvatars/aad.<base64url>200 image/pngcreatedByandreviewershttps://dev.azure.com/<org>/_api/_common/identityImage?id=<guid>302to the sign-in pageaz devops team list-member, Issues assignee picker)https://dev.azure.com/<org>/_api/_common/identityImage?id=<guid>302to the sign-in pageMemberAvatarsneeds no credential at all. I checked it with plaincurlagainst a real organization:MemberAvatars/<guid>returns the same bytes asMemberAvatars/<descriptor>, for authors and for reviewers. That matters because reviewers come back withdescriptor: null(156 of 156 in one project), while authors carry one. With the GUID form, no lookup is needed for either.dev.azure.com/<org>and<org>.visualstudio.com, and GUID case does not matter.?size=2returns 115 to 130 KB, so keep the default.404. The client then shows the initial, as it does today for every Azure avatar.Cache-Control: no-cache, no-store, so the browser refetches each time. At a few KB per avatar that is fine.Proposed fix
Add one helper in
packages/source-control-azure-devopsthat rewrites<origin>/_api/_common/identityImage?id=<guid>to<origin>/_apis/GraphProfile/MemberAvatars/<guid>. Leave any other URL as it is. Use it where the adapter readsimageUrltoday:azureDevOpsPullRequestJson.ts:177, PR authors and reviewers. This is the bug in this issue.AzureDevOpsIssueTracker.ts:1019, team members for the Issues assignee picker. Same bug, added with the issue trackers in feat(issues): add GitLab, Azure DevOps, and Forgejo issue trackers #19261.azureDevOpsIssueJson.ts:147, work item identities. These already useMemberAvatars, so the helper leaves them alone. It covers the case where Azure returns the old form.Plus a unit test for the rewrite. Contracts, web, mobile, and desktop stay as they are. Only the server changes, and because the client loads the image straight from Azure, it works the same in local, remote, and tunnel connections.
Relation to #24357
#24357 fixes this by fetching the avatar on the server with two
az devops invokecalls, caching it, and serving it throughfetchMediaand a signed/api/assetsURL. It builds on the host media hooks from #23994 and makescwdoptional in the source control media contract. The rewrite above makes all of that unnecessary, so I plan to close #24357 once this lands.Version: v0.1.11, checked against
main@ 898c22f.