Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Impersonation with Microsoft Graph

Is there a way to impersonate a user in office 365 using the new Microsoft Graph API?

I am currently using EWS API to impersonate office 365 users to add calendar events.

like image 710
Thivy Ruthra Avatar asked Dec 02 '15 23:12

Thivy Ruthra


People also ask

What is Exchange impersonation?

Exchange Impersonation is a right that can be granted to an account on an Exchange server. Impersonation is ideal for applications, such as Carbonite Safe Server Backup, that connect to local Exchange servers or Exchange Online. It allows a single service account to access any number of other mailboxes.

What can you do with Microsoft graphs?

Microsoft Graph is a RESTful web API that enables you to access Microsoft Cloud service resources. After you register your app and get authentication tokens for a user or service, you can make requests to the Microsoft Graph API.

What is Microsoft Graph permissions?

The Microsoft Graph has two categories of permissions: application permissions and delegated permissions. Application permissions allow an app to act as any user, while delegated permission allows only signed-in users of the application. All permissions requested by Decisions are delegated permissions.


1 Answers

The Microsoft Graph uses OAuth2.0, and so you can have your app operate as the signed-in user, if the user grants the app the ability (in your case) to read/write calendar events. (In OAuth2.0 this flow is known as the code flow). If you need your app to create events on behalf of many users, where the user is not actually signed in to your app - say your app is a daemon service of some sort - then you could use the OAuth2.0 app-only (client credential) flow. Acquiring delegated access token to call Microsoft Graph is documented here: https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow

Hope this helps,

like image 103
Dan Kershaw - MSFT Avatar answered Nov 20 '22 19:11

Dan Kershaw - MSFT