[英]Microsoft Graph APIs not returning Calendar Events
I am trying to use Microsoft Graph APIs in my MVC Application to fetch, create, update and delete Calendar Events.我正在尝试在我的 MVC 应用程序中使用 Microsoft Graph API 来获取、创建、更新和删除日历事件。 I am facing the following two problems in achieving this task:
我在完成这项任务时面临以下两个问题:
I already have an OWIN Authorization in my system, which is conflicting with Azure AD Authorization.我的系统中已经有一个 OWIN 授权,它与 Azure AD 授权相冲突。 Can two Authorizations simultaneously run, and if yes, how?
两个授权是否可以同时运行,如果是,如何运行?
Even if I somehow get the Azure AD token and try to use it to fetch events, the async function gets stuck at the await
statement and does not return any output in my System, although the same works well in a stand-alone application.即使我以某种方式获取 Azure AD 令牌并尝试使用它来获取事件,异步函数也会卡在
await
语句中并且不会在我的系统中返回任何输出,尽管在独立应用程序中同样有效。 What could be wrong in my System?我的系统可能有什么问题?
How to convert the JSON string returned from API using ReadAsStringAsync()
function into a List<>
of Microsoft.Graph.Event
type object?如何将使用
ReadAsStringAsync()
函数从 API 返回的 JSON 字符串转换为Microsoft.Graph.Event
类型对象的List<>
?
All help would be hugely appreciated.所有帮助将不胜感激。
Thanks in advance!提前致谢!
I already have an OWIN Authorization in my system, which is conflicting with Azure AD Authorization.
我的系统中已经有一个 OWIN 授权,它与 Azure AD 授权相冲突。 Can two Authorizations simultaneously run, and if yes, how?
两个授权是否可以同时运行,如果是,如何运行?
In your case, you have your own Identity Server, which means you can use Get Access without a user.在您的情况下,您拥有自己的身份服务器,这意味着您可以在没有用户的情况下使用Get Access。
As the official document mentioned, you can run it as a background services or daemons.正如官方文档所述,您可以将其作为后台服务或守护进程运行。
We can get access token from this background services when we need it and use it to call Microsoft Graph.我们可以在需要时从这个后台服务中获取访问令牌,并使用它来调用 Microsoft Graph。
Even if I somehow get the Azure AD token and try to use it to fetch events, the async function gets stuck at the await statement and does not return any output in my System, although the same works well in a stand-alone application.
即使我以某种方式获取 Azure AD 令牌并尝试使用它来获取事件,异步函数也会卡在 await 语句中并且不会在我的系统中返回任何输出,尽管在独立应用程序中同样有效。 What could be wrong in my System?
我的系统可能有什么问题?
Could you please provide the sample code for Positioning problem?你能提供定位问题的示例代码吗?
How to convert the JSON string returned from API using ReadAsStringAsync() function into a List<> of Microsoft.Graph.Event type object?
如何将使用 ReadAsStringAsync() 函数从 API 返回的 JSON 字符串转换为 Microsoft.Graph.Event 类型对象的 List<>?
If when we get the response string, we can use the following code to convert the string into a List<>
of Microsoft.Graph.Event
type object如果当我们得到响应字符串时,我们可以使用以下代码将字符串转换为
Microsoft.Graph.Event
类型对象的List<>
JsonConvert.DeserializeObject<List<Event>>(responseString);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.