sharingPolicies
Calendar Sharing Policies. Control how users share calendars and contacts with external domains. The sharingPolicies entity set lives under /exchange/v1.0/sharingPolicies in the Sharing & federation category.
| Fact | Value |
|---|---|
| Path | /exchange/v1.0/sharingPolicies |
| Category | Sharing & federation |
| Tier | Tier 3, Mail flow |
| Read role | MailFlow.Read.All (Community) |
| Write role | MailFlow.ReadWrite.All (Pro) |
| Backing cmdlets | Get-SharingPolicy, Set-SharingPolicy, New-SharingPolicy, Remove-SharingPolicy |
Routes
Section titled “Routes”| Method | Path | Synopsis | Role | Plan |
|---|---|---|---|---|
| GET | /exchange/v1.0/sharingPolicies |
List sharingPolicies entries. | MailFlow.Read |
Community |
| POST | /exchange/v1.0/sharingPolicies |
Create a new sharingPolicies entry. Body keys map 1:1 to the cmdlet’s parameter names (camelCased). Returns 201 + Location + the freshly-fetched entity. Use ?dryRun=true to map to -WhatIf without applying. | MailFlow.ReadWrite |
Pro |
| GET | /exchange/v1.0/sharingPolicies/{key} |
Get a single sharingPolicies entry by Identity. | MailFlow.Read |
Community |
| PATCH | /exchange/v1.0/sharingPolicies/{key} |
Partial update of the sharingPolicies at /sharingPolicies/{key}. Only body fields present are passed to the cmdlet. Returns 200 + the post-Set entity (rename-aware re-fetch when name is in the body). |
MailFlow.ReadWrite |
Pro |
| DELETE | /exchange/v1.0/sharingPolicies/{key} |
Remove the sharingPolicies at /sharingPolicies/{key}. Returns 204 with no body. | MailFlow.ReadWrite |
Pro |
GET /exchange/v1.0/sharingPolicies
Section titled “GET /exchange/v1.0/sharingPolicies”List sharingPolicies entries.
Backing cmdlet: Get-SharingPolicy. Role: MailFlow.Read (Community).
List sharingPolicies
Section titled “List sharingPolicies”Stub auto-generated example for the sharingPolicies collection. Backing cmdlet: Get-SharingPolicy. Live-verify with ?$top=3&$select=Id,Name and replace the synthetic body before promoting to Tier 1.
GET /exchange/v1.0/sharingPolicies?$top=3 HTTP/1.1Authorization: Bearer {token}HTTP/1.1 200 OK
{ "@odata.context": "http://localhost:5043/exchange/v1.0/$metadata#sharingPolicies", "value": []}Notes: Illustrative example derived from the cmdlet documentation, not a live capture: field names are real, values are placeholders.
Related: GET /exchange/v1.0/sharingPolicies/{key}
POST /exchange/v1.0/sharingPolicies
Section titled “POST /exchange/v1.0/sharingPolicies”Create a new sharingPolicies entry. Body keys map 1:1 to the cmdlet’s parameter names (camelCased). Returns 201 + Location + the freshly-fetched entity. Use ?dryRun=true to map to -WhatIf without applying.
Backing cmdlet: New-SharingPolicy. Role: MailFlow.ReadWrite (Pro).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
domains |
body | yes | ||
name |
body | yes | ||
default |
body | boolean (switch) | ||
enabled |
body | |||
dryRun |
query | bool (switch) |
Create a sharing policy with a missing required field
Section titled “Create a sharing policy with a missing required field”Rejects a New-SharingPolicy request that omits the required domains field. Backed by the New-SharingPolicy cmdlet.
POST /exchange/v1.0/sharingPolicies HTTP/1.1Authorization: Bearer {token}Content-Type: application/json
{ "name": "exonaut-sample-sharingPolicies", "enabled": true}HTTP/1.1 400 Bad RequestContent-Type: application/json
{ "error": { "code": "BadRequest", "message": "The 'domains' field is required.", "target": "domains" }, "correlationId": "0HN7ABCDEF1234567890ABCDEF"}Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.
Related: GET /exchange/v1.0/sharingPolicies
Create a sharing policy
Section titled “Create a sharing policy”Creates an organization sharing policy that governs free/busy and calendar sharing with external domains. Backed by the New-SharingPolicy cmdlet.
POST /exchange/v1.0/sharingPolicies HTTP/1.1Authorization: Bearer {token}Content-Type: application/json
{ "name": "exonaut-sample-sharingPolicies", "domains": [ "contoso.com: CalendarSharingFreeBusyReviewer" ], "enabled": true}HTTP/1.1 201 CreatedLocation: /exchange/v1.0/sharingPolicies/exonaut-sample-sharingPolicies
{ "Identity": "exonaut-sample-sharingPolicies", "Name": "exonaut-sample-sharingPolicies", "Domains": [ "contoso.com: CalendarSharingFreeBusyReviewer" ], "Enabled": true}Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.
Related: GET /exchange/v1.0/sharingPolicies
GET /exchange/v1.0/sharingPolicies/{key}
Section titled “GET /exchange/v1.0/sharingPolicies/{key}”Get a single sharingPolicies entry by Identity.
Backing cmdlet: Get-SharingPolicy. Role: MailFlow.Read (Community).
Get a single sharingPolicies entry
Section titled “Get a single sharingPolicies entry”Stub auto-generated example for GET /sharingPolicies/{key}. Backing cmdlet: Get-SharingPolicy with -Identity {key}. Returns the full entity body; 404 if the identity doesn’t resolve.
GET /exchange/v1.0/sharingPolicies/{key} HTTP/1.1Authorization: Bearer {token}HTTP/1.1 200 OK
{ "@odata.context": "http://localhost:5043/exchange/v1.0/$metadata#sharingPolicies/$entity"}Notes: Illustrative example derived from the cmdlet documentation, not a live capture: field names are real, values are placeholders.
Related: GET /exchange/v1.0/sharingPolicies
PATCH /exchange/v1.0/sharingPolicies/{key}
Section titled “PATCH /exchange/v1.0/sharingPolicies/{key}”Partial update of the sharingPolicies at /sharingPolicies/{key}. Only body fields present are passed to the cmdlet. Returns 200 + the post-Set entity (rename-aware re-fetch when name is in the body).
Backing cmdlet: Set-SharingPolicy. Role: MailFlow.ReadWrite (Pro).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
default |
body | boolean (switch) | ||
domains |
body | |||
enabled |
body | |||
name |
body | |||
dryRun |
query | bool (switch) |
Update a sharing policy
Section titled “Update a sharing policy”Partially updates an existing sharing policy; only the body fields present are passed through. Backed by the Set-SharingPolicy cmdlet.
PATCH /exchange/v1.0/sharingPolicies/{key} HTTP/1.1Authorization: Bearer {token}Content-Type: application/json
{ "domains": [ "contoso.com: CalendarSharingFreeBusyDetail" ], "enabled": false}HTTP/1.1 200 OKContent-Type: application/json
{ "Identity": "exonaut-sample-sharingPolicies", "Name": "exonaut-sample-sharingPolicies", "Domains": [ "contoso.com: CalendarSharingFreeBusyDetail" ], "Enabled": false}Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.
Related: GET /exchange/v1.0/sharingPolicies
DELETE /exchange/v1.0/sharingPolicies/{key}
Section titled “DELETE /exchange/v1.0/sharingPolicies/{key}”Remove the sharingPolicies at /sharingPolicies/{key}. Returns 204 with no body.
Backing cmdlet: Remove-SharingPolicy. Role: MailFlow.ReadWrite (Pro).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
dryRun |
query | bool (switch) |
Delete a sharing policy
Section titled “Delete a sharing policy”Removes the sharing policy identified by {key}. Backed by the Remove-SharingPolicy cmdlet.
DELETE /exchange/v1.0/sharingPolicies/{key} HTTP/1.1Authorization: Bearer {token}Content-Type: application/jsonHTTP/1.1 204 No ContentNotes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.
Related: GET /exchange/v1.0/sharingPolicies
?dryRun=true previews of any write stay on Community.

