Open fhlbdvt opened 2 years ago
Hey @fhlbdvt,
Thanks for raising this issue. Is the user you are trying to set the photo a newly created user?
No, it is not a newly created user.
We've raised this with the relevant API team here and will revert with any feedback received.
Hey @fhlbdvt,
Any chance you are still able to replicate this error? The team wishes to confirm if its transient and it would be great if you could share the error response as you did above.
I'll try to reproduce and post the result here.
Got the same error:
Microsoft.Graph.ServiceException : Code: UnknownError
Message: {
"errorCode": "ErrorUserResolutionFailedUserDoesNotExist",
"message": "Exception of type 'Microsoft.Fast.Profile.Core.Exception.ProfileNotFoundException' was thrown.",
"target": null,
"details": null,
"innerError": null,
"instanceAnnotations": []
}
Inner error:
AdditionalData:
date: 2021-11-08T17:39:56
request-id: 0f09b6c8-1149-4a68-9127-8dff4fe693a3
client-request-id: 0f09b6c8-1149-4a68-9127-8dff4fe693a3
ClientRequestId: 0f09b6c8-1149-4a68-9127-8dff4fe693a3
I'm seeing the same issue, also not for newly created users. These are Azure AD B2C users, if that matters. I've switched to the beta API to see if that affected things, but it doesn't appear to. Here's the calling code:
public async Task UpdateUserPhoto(Guid userId, string contentType, Stream photoContent)
{
using var request = new HttpRequestMessage(HttpMethod.Put, $"https://graph.microsoft.com/beta/users/{userId}/photo/$value");
request.Content = new StreamContent(photoContent) { Headers = { ContentType = MediaTypeHeaderValue.Parse(contentType), }, };
await this.GraphClient.AuthenticationProvider.AuthenticateRequestAsync(request);
await this.GraphClient.HttpProvider.SendAsync(request);
}
And here's the error response:
{
"error": {
"code": "UnknownError",
"message": "{\r\n \"errorCode\": \"ErrorUserResolutionFailedUserDoesNotExist\",\r\n \"message\": \"Exception of type 'Microsoft.Fast.Profile.Core.Exception.ProfileNotFoundException' was thrown.\",\r\n \"target\": null,\r\n \"details\": null,\r\n \"innerError\": null,\r\n \"instanceAnnotations\": []\r\n}",
"innerError": {
"date": "2021-11-15T21:13:35",
"request-id": "c768e5eb-3666-41f9-8ed4-d953e98092c4",
"client-request-id": "c768e5eb-3666-41f9-8ed4-d953e98092c4"
}
}
}
Are there any updates on this issue?
Thank you for reporting this issue. This appears to be an issue or limitation with the service APIs. Unfortunately, as the Microsoft Graph SDK team, we do not have ownership of the APIs that are causing you issues. We invite you to create a question about the service API to Microsoft Q&A and tagged with one of the [microsoft-graph-*] tags, that way it will get routed to the appropriate team for them to triage.
Microsoft Graph | Support or https://aka.ms/askgraph
For now, we will close the issue on our side but feel free to open it in the relevant repository if you think the issue is specific to SDK.
Please let us know if this helps!
Note: We will close this repository on April 19, 2024.
When using Microsoft.Graph.Beta version 4.14.0-preview to update a user photo, got the following error:
and call to get user is successful: