与https://docs.microsoft.com/en-us/graph/api/profilephoto-update?view=graph-rest-1.0&tabs=http上的文档相反,在.Content
下没有可用的.Photo
对象。
group.Photo.Content.Request().PutAsync(photoStream).Result;
我正在寻求更新该论坛的个人资料照片,但该照片无法使用。
下面的代码对我有用。可以请您尝试类似的方法。
GraphServiceClient graphClient = new GraphServiceClient(authProvider);
var stream = await graphClient.Groups["groupId"].Photo.Content
.Request()
.GetAsync();
我已经安装了Microsoft.Graph Nuget版本3.4.0。