IUserRequestBuilder 不包含 FindRooms 的定义,如何使用 Microsoft Graph 在 C#.net 中解决它?
IUserRequestBuilder does not contain a definition for FindRooms, HOw to solve it in C#.net using microsoft graph?
我想要创建的房间列表名称。我在 FindingRooms
方法中遇到错误,IUserRequestBuilder
不包含 FindRooms
的定义。如何解决?
IPublicClientApplication publicClientApplication = PublicClientApplicationBuilder
.Create("****-8d12-45ce-99dc-ee97478abc48")
.WithTenantId("****-0c15-41f2-9858-b64924a83a6c").WithRedirectUri("http://localhost")
.Build();
var password = new SecureString();
password.AppendChar('<');
password.AppendChar('T');
password.AppendChar('N');
password.AppendChar('>');
password.AppendChar('7');
UsernamePasswordProvider authProvider = new UsernamePasswordProvider(publicClientApplication, scopes);
GraphServiceClient graphClient = new GraphServiceClient(authProvider);
Microsoft.Graph.User me = graphClient.Me.Request()
.WithUsernamePassword("Tej@indica.onmicrosoft.com", password)
.GetAsync().Result;
var findRooms = await graphClient.Me
.FindRooms("Test@indica.onmicrosoft.com")
.Request()
.GetAsync();
目前,findRooms
API 是 Graph 测试版。所以,你需要添加 Microsoft.Graph.Beta
包。
我想要创建的房间列表名称。我在 FindingRooms
方法中遇到错误,IUserRequestBuilder
不包含 FindRooms
的定义。如何解决?
IPublicClientApplication publicClientApplication = PublicClientApplicationBuilder
.Create("****-8d12-45ce-99dc-ee97478abc48")
.WithTenantId("****-0c15-41f2-9858-b64924a83a6c").WithRedirectUri("http://localhost")
.Build();
var password = new SecureString();
password.AppendChar('<');
password.AppendChar('T');
password.AppendChar('N');
password.AppendChar('>');
password.AppendChar('7');
UsernamePasswordProvider authProvider = new UsernamePasswordProvider(publicClientApplication, scopes);
GraphServiceClient graphClient = new GraphServiceClient(authProvider);
Microsoft.Graph.User me = graphClient.Me.Request()
.WithUsernamePassword("Tej@indica.onmicrosoft.com", password)
.GetAsync().Result;
var findRooms = await graphClient.Me
.FindRooms("Test@indica.onmicrosoft.com")
.Request()
.GetAsync();
目前,findRooms
API 是 Graph 测试版。所以,你需要添加 Microsoft.Graph.Beta
包。