简体   繁体   中英

Microsoft Graph: as Admin, create events in user calendar

I'm building an application, which will need to send requests to Microsoft Graph , and create events in Office 365 Calendar.

I'm using events endpoint:

'users /' + graphdata ['userPrincipalName'] + '/ events'

There's no problems when I create events for the account accessing the app.

But I would like to, as ADMIN, grant permission to create these events in the calendar of other users.

I have look in the documentation for some permissions, among the admin permissions, that would allow me to do this, but I did not find anything.

Does anyone know of any way to do this in Microsoft Graph?

I initially believed that the endpoint users / '+ graphdata [' userPrincipalName '] +' / events allowed this because one of the parameters is the username of the email account.

The error I get when I try to use this endpoit with another user is: 404: ErrorItemNotFound - The specified object was not found in this store.

When you're authenticated as a user you are using Delegated scopes and you only have access to their mailbox (and any shared with them).

If you want to create events on calendars on any account, you need to use the Client Credentials OAuth grant and Application scopes. This process is documented under Get access without a user .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM