简体   繁体   English

Microsoft Graph API 不返回日历事件

[英]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:我在完成这项任务时面临以下两个问题:

  1. 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?两个授权是否可以同时运行,如果是,如何运行?

  2. 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?我的系统可能有什么问题?

  3. 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.

相关问题 如何在日历视图中展开日历事件中的 Microsoft Graph 扩展属性 - How to expand Microsoft Graph extended properties in calendar events in a calendar view 使用批处理模式通过Microsoft Graph删除许多日历事件 - Use batch mode to delete many calendar events with Microsoft Graph 如何使用 Microsoft graph api 将 colors 应用于 outlook 日历事件? - How to apply colors to outlook calendar events using Microsoft graph api? 使用 C# 和 Microsoft Graph SDK 从日历中获取事件 - Getting Events from Calendar using C# and Microsoft Graph SDK 使用Microsoft图形API获取Outlook日历事件 - Using Microsoft graph api to get outlook calendar events Microsoft graph 无需用户即可访问以获取日历事件 - Microsoft graph get access without a user to get calendar events 使用 Microsoft Graph 创建新日历 - Create new calendar with Microsoft Graph 如何在获取日历事件时解决“Microsoft.graph.serviceexception 代码 generalexceptionmessage 发送请求时发生错误”? - how to solve "Microsoft.graph.serviceexception code generalexceptionmessage an error occurred sending the request" while fetching calendar events? Office 365 API Microsoft Graph身份验证失败 - Office 365 APIs Microsoft Graph authentication failed 如何使用 Microsoft Graph 中的一些 API - How to use some APIs from Microsoft Graph
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM