Create Calendar Event for another user using the REST API RRS feed

  • Question

  • Is it possible to create a calendar event for another user that the signed in user has edit, or delegate rights to the other user's calendar?

    With the following code in a Win 10 universal APP I am getting an access denied error:

    //get the user that I want to create the appointment for
    var user = _outlookClient.Users.GetById("");
    //this works 
    //var user = _outlookClient.Me;
    //create the appointment
    var exchangeClient = await O365AuthenticationHelper.GetOutlookClientAsync(_calendarCapability);
    await user.Events.AddEventAsync(newEvent);

    Notice that I can create the event for the signed in user if I uncomment "var user = _outlookClient.Me;".

    The signed in user has edit rights on the target user's calendar. I have tried this with both edit and delegate permissions.

    Also I can through the O365 Calendar Web app create the event in the other user's calendar singed in as the same user I am running the APP as.

    Is it possible to do this using the REST API?

    If so am I doing this the wrong way?

    Thanks for your Help!

    Monday, October 5, 2015 12:58 PM

All replies

  • The REST API does not support shared folders/calendars or delegate access. This is largely due to the current OAuth permissions. The user consents to allow the app to access their own data only, not other users' data (even if that user has shared the data with them).

    Enabling delegate access is something we're looking into, but for now it isn't possible. The only way for an app to access multiple mailboxes currently is via the client credentials flow, which requires an administrator to consent.

    Monday, October 5, 2015 1:28 PM