Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
611 views
in Technique[技术] by (71.8m points)

How to get public folder calendar ID in order to create event using Microsoft Graph API?

Using Microsoft Graph Explorer I can read all of my calendars. For that I use GET request:

https://graph.microsoft.com/v1.0/me/calendars

In these calendars, I cannot see the public folder calendar. Just to mention that I am the Owner of the Public folder calendar and have permission to create a new event.

I use the following POST request

https://graph.microsoft.com/v1.0/me/calendars/{calendar ID}/events

in order to get all events for some of my calendar IDs and send JSON request using auth token to create a new event in my calendar:

{
   'Authorization': 'Bearer {}'.format(session['microsoft_token']),
   'Host': 'graph.microsoft.com',
   'Content-Type': 'application/json'
}

Also, I am sending JSON data with specific event data that needs to be created.

But I cannot access to public folder calendar until I know its calendar ID.

question from:https://stackoverflow.com/questions/65905631/how-to-get-public-folder-calendar-id-in-order-to-create-event-using-microsoft-gr

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think that public folders are not supported.

UserVoice

But only an attempt. Can you try to find your public folder calendar using

https://graph.microsoft.com/v1.0/me/mailFolders
or
https://graph.microsoft.com/v1.0/me/mailFolders/{folderId}/childFolders

If it will find the folder you are looking for then try to use it's id in your request

https://graph.microsoft.com/v1.0/me/calendars/{public folder calendar ID}/events

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...