-
Notifications
You must be signed in to change notification settings - Fork 263
Closed
Labels
Status: No recent activitystatus:waiting-for-author-feedbackIssue that we've responded but needs author feedback to closeIssue that we've responded but needs author feedback to close
Description
If I request a PatchAsync to update a user on a B2C tenant with GraphClient, it should return the updated user. This worked a week ago, now the GraphClient response is always null, even if the user is properly updated (i've double checked on the B2C tenant to see if it's updated).
Here's the lines of code where i perform the actual call:
public async Task<DefaultResponse<B2CUserDto?>> UpdateB2CUserAsync(CreateUserRequest request, string id)
{
try
{
var user = await graphClient.Users[id].GetAsync();
if (user is null)
return new()
{
IsOk = false,
Message = $"Failed to retrieve user with Id {id}",
StatusCode = ApplicationStatusCode.NotFound
};
var mappedUser = b2CUserMapper.Map(request);
var response = await graphClient.Users[id].PatchAsync(mappedUser);
if (response is null)
return new()
{
IsOk = false,
Message = $"Failed to update user with Id {id}",
StatusCode = ApplicationStatusCode.ServerError
};
return new()
{
IsOk = true,
Message = "User successfully updated",
Value = b2CUserMapper.MapToDto(request, id)
};
}
catch (Exception ex)
{
return new(ex.Message);
}
}
Here's the response I got two days ago:
And the actual response is null instead.
breazy00, Reykrot and tiaringhio
Metadata
Metadata
Assignees
Labels
Status: No recent activitystatus:waiting-for-author-feedbackIssue that we've responded but needs author feedback to closeIssue that we've responded but needs author feedback to close