Calendars.ReadWrite
Allows the app to create, read, update, and delete events of all calendars without a signed-in user.
Permission Details
Read and write calendars in all mailboxes
Allows the app to create, read, update, and delete events of all calendars without a signed-in user.
ef54d2bf-783f-4e0f-bca1-3210c0444d99
Have full access to user calendars
Allows the app to create, read, update, and delete events in user calendars.
1ec239c2-d7c9-4623-a91a-a9775856bb36
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
allowedOnlineMeetingProviders |
onlineMeetingProviderType collection |
Represent the online meeting service providers that can be used to create online meetings in this calendar. The possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. |
canEdit |
BooleanNullable |
true if the user can write to the calendar, false otherwise. This property is true for the user who created the calendar. This property is also true for a user who shared a calendar and granted write access. |
canShare |
BooleanNullable |
true if the user has permission to share the calendar, false otherwise. Only the user who created the calendar can share it. |
canViewPrivateItems |
BooleanNullable |
If true, the user can read calendar items that have been marked private, false otherwise. |
changeKey |
StringNullable |
Identifies the version of the calendar object. Every time the calendar is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. |
color |
calendarColor |
Specifies the color theme to distinguish the calendar from other calendars in a UI. The property values are: auto, lightBlue, lightGreen, lightOrange, lightGray, lightYellow, lightTeal, lightPink, lightBrown, lightRed, maxColor. |
defaultOnlineMeetingProvider |
onlineMeetingProviderType |
The default online meeting provider for meetings sent from this calendar. The possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. |
hexColor |
StringNullable |
The calendar color, expressed in a hex color code of three hexadecimal values, each ranging from 00 to FF and representing the red, green, or blue components of the color in the RGB color space. If the user has never explicitly set a color for the calendar, this property is empty. Read-only. |
id |
String |
The calendar's unique identifier. Read-only. |
isDefaultCalendar |
BooleanNullable |
true if this is the default calendar where new events are created by default, false otherwise. |
isRemovable |
BooleanNullable |
Indicates whether this user calendar can be deleted from the user mailbox. |
isTallyingResponses |
BooleanNullable |
Indicates whether this user calendar supports tracking of meeting responses. Only meeting invites sent from users' primary calendars support tracking of meeting responses. |
name |
StringNullable |
The calendar name. |
owner |
emailAddress |
If set, this represents the user who created or added the calendar. For a calendar that the user created or added, the owner property is set to the user. For a calendar shared with the user, the owner property is set to the person who shared that calendar with the user. |
calendarPermissions |
calendarPermission collection |
The permissions of the users with whom the calendar is shared. |
Showing 15 of 19 properties.
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"allowedOnlineMeetingProviders": [
"string"
],
"canEdit": "boolean",
"canShare": "boolean",
"canViewPrivateItems": "boolean",
"changeKey": "string",
"color": "String",
"defaultOnlineMeetingProvider": "string",
"hexColor": "String",
"id": "string (identifier)",
"isDefaultCalendar": "boolean",
"isRemovable": "boolean",
"isTallyingResponses": "boolean",
"name": "string",
"owner": {
"@odata.type": "microsoft.graph.emailAddress"
}
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
calendarPermissions |
calendarPermission collection |
The permissions of the users with whom the calendar is shared. |
calendarView |
Event collection |
The calendar view for the calendar. Navigation property. Read-only. |
events |
Event collection |
The events in the calendar. Navigation property. Read-only. |
multiValueExtendedProperties |
multiValueLegacyExtendedProperty collection |
The collection of multi-value extended properties defined for the calendar. Read-only. Nullable. |
singleValueExtendedProperties |
singleValueLegacyExtendedProperty collection |
The collection of single-value extended properties defined for the calendar. Read-only. Nullable. |
allowedOnlineMeetingProviders |
array |
Represent the online meeting service providers that can be used to create online meetings in this calendar. The possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. |
owner |
object |
If set, this represents the user who created or added the calendar. For a calendar that the user created or added, the owner property is set to the user. For a calendar shared with the user, the owner property is set to the person who shared that calendar with the user. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new FileAttachment
{
OdataType = "#microsoft.graph.fileAttachment",
Name = "menu.txt",
ContentBytes = Convert.FromBase64String("base64bWFjIGFuZCBjaGVlc2UgdG9kYXk="),
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.Events["{event-id}"].Attachments.PostAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const attachment = {
'@odata.type': '#microsoft.graph.fileAttachment',
name: 'menu.txt',
contentBytes: 'base64bWFjIGFuZCBjaGVlc2UgdG9kYXk='
};
await client.api('/me/events/AAMkAGI1AAAt9AHjAAA=/attachments')
.post(attachment);
Import-Module Microsoft.Graph.Calendar
$params = @{
"@odata.type" = "#microsoft.graph.fileAttachment"
name = "menu.txt"
contentBytes = "base64bWFjIGFuZCBjaGVlc2UgdG9kYXk="
}
# A UPN can also be used as -UserId.
New-MgUserEventAttachment -UserId $userId -EventId $eventId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.file_attachment import FileAttachment
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = FileAttachment(
odata_type = "#microsoft.graph.fileAttachment",
name = "menu.txt",
content_bytes = base64.urlsafe_b64decode("base64bWFjIGFuZCBjaGVlc2UgdG9kYXk="),
)
result = await graph_client.me.events.by_event_id('event-id').attachments.post(request_body)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Application permissions or delegated permissions and search for Calendars.ReadWrite
Grant Admin Consent
Application permissions always require admin consent.