我如何使用 Microsoft graph sdk 获取特定分辨率的个人资料照片
How do i Get profile photo of specific resolution using Microsoft graph sdk
如何使用图形服务客户端 sdk 获取特定分辨率的个人资料图片?
使用下面的代码我得到只有一种分辨率的个人资料图片,即 360* 360
graphServiceClient.Users["serviceprincipal"].Photo.Content.Request().GetAsync().Result
谢谢,
经过研发,找到答案
var graphServiceClient= new GraphServiceClient(
new DelegateAuthenticationProvider(
(requestMessage) =>
{
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", response.access_token);
return Task.FromResult(0);
}));
graphServiceClient.Users["serviceprincipal"].Photos["64x64"].Content.Request().GetAsync().Result
如何使用图形服务客户端 sdk 获取特定分辨率的个人资料图片? 使用下面的代码我得到只有一种分辨率的个人资料图片,即 360* 360
graphServiceClient.Users["serviceprincipal"].Photo.Content.Request().GetAsync().Result
谢谢,
经过研发,找到答案
var graphServiceClient= new GraphServiceClient(
new DelegateAuthenticationProvider(
(requestMessage) =>
{
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", response.access_token);
return Task.FromResult(0);
}));
graphServiceClient.Users["serviceprincipal"].Photos["64x64"].Content.Request().GetAsync().Result