我的问题正是标题中所说的.如果我想使用 MicrosoftGraph 与用户交互,我有几个选择:
My problem is exactly what it says in the title. If I want to interact with users using MicrosoftGraph, I have a few options:
graphClient.Users.Request.GetAsync()
graphClient.Users.Request.AddAsync()
我想看看:
graphClient.Users.Request.UpdateAsync()
不幸的是,我的问题是我没有看到它.它在哪里?我在其他一些对象上看到了 UpdateAsync……为什么它不在用户身上?我错过了一些重要的文档吗?
Unfortunately, my problem is that I don't see it. Where is it? I see UpdateAsync on a few other objects... why is it not on users? Did I miss some crucial piece of documentation?
它在用户上.你错过了一些东西.您尚未识别用户,请使用索引器.此外,Request 是一种方法,而不是属性.
It is on User. You're missing a few things. You haven't identified the user, use the indexer. Also, Request is a method, not a property.
var betterMe = new User()
{
GivenName = "Super Man"
};
// Update the user to Super Man
await graphClient.Users[myId].Request().UpdateAsync(betterMe);
上一篇:更优雅的方式来解除code符\ u0000统一code输入流优雅、方式、code
下一篇:如何使用 Microsoft Graph API 检索其他用户的 MS Teams 聊天?其他用户、如何使用、Microsoft、API