Understanding Microsoft Graph Permissions

Published: October 27, 2023

Microsoft Graph is the gateway to data and intelligence in Microsoft 365. To interact with this data securely and effectively, understanding its permission model is crucial. This post dives into the core concepts of Microsoft Graph permissions, helping you navigate the different types and choose the right ones for your applications.

What are Microsoft Graph Permissions?

Microsoft Graph permissions are scopes that an application requests to access specific resources and perform actions on behalf of a user or an organization. They act as granular controls, ensuring that applications only get the access they absolutely need. This principle, known as the principle of least privilege, is fundamental to modern security practices.

Types of Permissions

Microsoft Graph permissions are broadly categorized into two main types:

1. Delegated Permissions

Delegated permissions are used by applications that act on behalf of a signed-in user. The application's permissions are restricted by the permissions of the signed-in user. For example, if a user can read their own calendar, an application delegated calendar.Read permission can only read that user's calendar, not anyone else's.

2. Application Permissions

Application permissions are used by background services or daemons that do not have a signed-in user. These permissions allow the application to act as itself, with no user context. This means the application can access data across the entire organization, subject to its granted permissions. These are often more powerful and require administrator consent.

Key Distinction: Delegated permissions are limited by the user's scope, while application permissions operate at the organizational level, requiring higher trust and often administrator intervention.

Permission Levels: Read vs. ReadWrite and Other Scopes

Within each permission type, you'll often see variations indicating the level of access:

Admin Consent vs. User Consent

Permissions can be categorized by who grants consent:

Common Permission Scenarios

Here's a quick look at some typical permission needs:

Scenario Permission Type Microsoft Graph Permission Notes
App reads signed-in user's basic profile Delegated User.Read User consent
App sends emails on behalf of the user Delegated Mail.Send User consent (or admin for .All)
App reads all users in the directory Application User.Read.All Admin consent required
App manages groups (create, update, delete) Application Group.ReadWrite.All Admin consent required
App reads calendar events for all users Application Calendars.Read.All Admin consent required
App reads a specific user's files in OneDrive Delegated Files.Read User consent

Best Practices for Permissions

Mastering Microsoft Graph permissions is key to building secure, reliable, and user-friendly applications that leverage the power of the Microsoft 365 ecosystem. Always refer to the official Microsoft Graph permissions reference for the most up-to-date and comprehensive information.