How can my third party application access on-premise users calendar using modern authentication via EWS API?

Aliraza HN 5 Reputation points
2024-08-29T06:42:10.4766667+00:00

I have a third party application wherein some of my users are using On-Premise Exchange server,

How can I access or create calendar events in their on-premise Outlook account using modern authentication?

We were able to fetch calendar events by authenticating users via NTLM method & using EWS API, but we don't want to store users password on our server & we are looking for token based system

Can someone help how we can fetch/create/update events for completely on-premise Exchange Server 2019 (CU14) clients, what should we ask our clients to do on their end?

Please let us know if there are any other possibilities as well in doing above with less efforts on both the sides

Thank you

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,264 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,855 questions
Active Directory Federation Services
Active Directory Federation Services
An Active Directory technology that provides single-sign-on functionality by securely sharing digital identity and entitlement rights across security and enterprise boundaries.
1,249 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 4,240 Reputation points Microsoft Vendor
    2024-08-29T08:58:35.38+00:00

    Hi @Aliraza HN

    For fetch/create/update events, it is recommended that you use the Graph API, which provides an endpoint for each function, see the link for details:

    https://learn.microsoft.com/en-us/graph/api/user-list-events?view=graph-rest-1.0&tabs=http

    https://learn.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http

    https://learn.microsoft.com/en-us/graph/api/event-update?view=graph-rest-1.0&tabs=http

    Importantly, to access the Graph API, you need to first register your app in Azure and then get an access token.

    There are two recommended ways to obtain the access token. One is to use Auth code flow, which requires the user to log in interactively and grant corresponding delegated permissions. For details, see this case.

    The other option is to use Client credentials flow. This mode does not require user participation, but requires the administrator to grant corresponding application permissions. For details, see Example.

    Hope this helps.

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


Your answer

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