Код: Выделить всё
POST https://graph.microsoft.com/v1.0/users/6ea91a8d-e32e-41a1-b7bd-d2d185eed0e0/authentication/passwordMethods/28c10230-6103-485e-b985-444c60001490/resetPassword
Content-type: application/json
{
"newPassword": "Cuyo5459"
}
Код: Выделить всё
var requestInfo = serviceClient.Users[userId].Authentication.PasswordMethods[passwordMethod.Id].ToGetRequestInformation();
requestInfo.HttpMethod = Microsoft.Kiota.Abstractions.Method.POST;
requestInfo.URI = new Uri(requestInfo.URI, "/resetPassword");
requestInfo.Content = new MemoryStream(Encoding.UTF8.GetBytes($"{{\"newPassword\":\"{password}\"}}"));
Код: Выделить всё
HTTP/1.1 202 Accepted
Content-type: application/json
Location: https://graph.microsoft.com/v1.0/users/6ea91a8d-e32e-41a1-b7bd-d2d185eed0e0/authentication/operations/88e7560c-9ebf-435c-8089-c3998ac1ec51?aadgdc=DUB02P&aadgsu=ssprprod-a
{}
Код: Выделить всё
var passwordResult = await serviceClient.RequestAdapter.SendAsync(requestInfo, PasswordResetResponse.CreateFromDiscriminatorValue);
Итак, какой подход можно использовать с помощью v5 Graph SDK для доступа к заголовку ответа?
Подробнее здесь: https://stackoverflow.com/questions/756 ... h-v5-0-sdk