Differences in microsoft graph API (events)

ooumi77 126 Reputation points
2022-06-02T12:32:40.497+00:00

I want to create an event in teams using the microsoft graph API. The difference between the following APIs is that (1) is used when the Permission type is Delegated, and (2) is used when the Permission type is Application?
Regarding (2), is it possible to specify a specific user and create a teams event?
Regarding (1), we recognize that a specific user cannot be specified.

(1) POST / me / events
(2) POST / users / {id | userPrincipalName} / events

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bhanu Kiran 3,616 Reputation points
    2022-06-02T13:50:03.12+00:00

    Hi @ooumi77 ,

    Here are the following answers to your queries:

    (1) POST /me/events - Is used for Delegated Permissions which can be used using Graph Explorer, the access token you get here is on behalf of your account and the selected permissions only apply to your calendar.

    (2) POST /users/{id|userPrincipalName}/events -

    To get access to a colleague's calendar you have to acquire an access token on their behalf or read/write to a shared or delegated calendar from them. To perform this it requires application scope.

    I tried to replicate the same at my end. please find the details below.

    207925-image.png

    Hope this helps,

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.