Microsoft: Update the navigation property calendar Groups in users
Microsoft usersCalendarGroup.updateCalendarGroups: arguments, response, policy and SDK examples.
← Users calendar group operations · Get started
Operation microsoft.users_updatecalendargroups
Provider route: PATCH /users/{user-id}/calendarGroups/{calendarGroup-id}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/microsoft with npm, or alter-sdk-microsoft with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { MicrosoftIntegration } from "@alter-ai/microsoft";
async function execute(input: Parameters<MicrosoftIntegration["usersCalendarGroup"]["updateCalendarGroups"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new MicrosoftIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.usersCalendarGroup.updateCalendarGroups(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_microsoft import MicrosoftIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = MicrosoftIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.users_calendar_group.update_calendar_groups(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.user-id | string | Required within parent | |
path.calendarGroup-id | string | Required within parent | |
body | Model | Required within parent | Expand Create Calendar Group — request body — body |
Referenced models: Create Calendar Group — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Get calendar Group — response body |
Referenced models: Get calendar Group — response body
Schemas
Section titled “Schemas”26 more schemas are linked from the tables above, on the schema pages.
Get calendar Group — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Get rule — response body — @odata type, id |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).@odata.type | string | Optional | |
$ (allOf 2).calendars | array | Optional | The calendars in the calendar group. Navigation property. Read-only. Nullable. |
$ (allOf 2).calendars[] | Model | Each item | Expand Get calendar — response body |
$ (allOf 2).changeKey | JSON | Optional | |
$ (allOf 2).changeKey (anyOf 1) | string | Alternative | Identifies the version of the calendar group. Every time the calendar group is changed, ChangeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. |
$ (allOf 2).changeKey (anyOf 2) | null | Alternative | |
$ (allOf 2).classId | JSON | Optional | |
$ (allOf 2).classId (anyOf 1) | string | Alternative | The class identifier. Read-only. Format: uuid Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
$ (allOf 2).classId (anyOf 2) | null | Alternative | |
$ (allOf 2).name | JSON | Optional | |
$ (allOf 2).name (anyOf 1) | string | Alternative | The group name. |
$ (allOf 2).name (anyOf 2) | null | Alternative |
Referenced models: Get calendar — response body, Get rule — response body — @odata type, id
Create Calendar Group — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Get rule — response body — @odata type, id |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).@odata.type | string | Optional | |
$ (allOf 2).calendars | array | Optional | The calendars in the calendar group. Navigation property. Read-only. Nullable. |
$ (allOf 2).calendars[] | Model | Each item | Expand Create Calendar Group — request body — body @odata type, calendars, change Key, class Id, name calendars item |
$ (allOf 2).changeKey | JSON | Optional | |
$ (allOf 2).changeKey (anyOf 1) | string | Alternative | Identifies the version of the calendar group. Every time the calendar group is changed, ChangeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. |
$ (allOf 2).changeKey (anyOf 2) | null | Alternative | |
$ (allOf 2).classId | JSON | Optional | |
$ (allOf 2).classId (anyOf 1) | string | Alternative | The class identifier. Read-only. Format: uuid Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
$ (allOf 2).classId (anyOf 2) | null | Alternative | |
$ (allOf 2).name | JSON | Optional | |
$ (allOf 2).name (anyOf 1) | string | Alternative | The group name. |
$ (allOf 2).name (anyOf 2) | null | Alternative |
Referenced models: Get rule — response body — @odata type, id, Create Calendar Group — request body — body @odata type, calendars, change Key, class Id, name calendars item
Create Calendar Group — request body — body @odata type, calendars, change Key, class Id, name calendars item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Get rule — response body — @odata type, id |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).@odata.type | string | Optional | |
$ (allOf 2).allowedOnlineMeetingProviders | array | Optional | 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. |
$ (allOf 2).allowedOnlineMeetingProviders[] | JSON | Each item | |
$ (allOf 2).allowedOnlineMeetingProviders[] (anyOf 1) | string | Alternative | One of: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness |
$ (allOf 2).allowedOnlineMeetingProviders[] (anyOf 2) | JSON | Alternative | |
$ (allOf 2).allowedOnlineMeetingProviders[] (anyOf 2) (anyOf 1) | object | Alternative | |
$ (allOf 2).allowedOnlineMeetingProviders[] (anyOf 2) (anyOf 2) | null | Alternative | |
$ (allOf 2).canEdit | JSON | Optional | |
$ (allOf 2).canEdit (anyOf 1) | boolean | Alternative | 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. |
$ (allOf 2).canEdit (anyOf 2) | null | Alternative | |
$ (allOf 2).canShare | JSON | Optional | |
$ (allOf 2).canShare (anyOf 1) | boolean | Alternative | true if the user has permission to share the calendar, false otherwise. Only the user who created the calendar can share it. |
$ (allOf 2).canShare (anyOf 2) | null | Alternative | |
$ (allOf 2).canViewPrivateItems | JSON | Optional | |
$ (allOf 2).canViewPrivateItems (anyOf 1) | boolean | Alternative | If true, the user can read calendar items that have been marked private, false otherwise. |
$ (allOf 2).canViewPrivateItems (anyOf 2) | null | Alternative | |
$ (allOf 2).changeKey | JSON | Optional | |
$ (allOf 2).changeKey (anyOf 1) | string | Alternative | 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. |
$ (allOf 2).changeKey (anyOf 2) | null | Alternative | |
$ (allOf 2).color | JSON | Optional | 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. |
$ (allOf 2).color (anyOf 1) | string | Alternative | One of: auto, lightBlue, lightGreen, lightOrange, lightGray, lightYellow, lightTeal, lightPink, lightBrown, lightRed, maxColor |
$ (allOf 2).color (anyOf 2) | JSON | Alternative | |
$ (allOf 2).color (anyOf 2) (anyOf 1) | object | Alternative | |
$ (allOf 2).color (anyOf 2) (anyOf 2) | null | Alternative | |
$ (allOf 2).defaultOnlineMeetingProvider | JSON | Optional | The default online meeting provider for meetings sent from this calendar. The possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. |
$ (allOf 2).defaultOnlineMeetingProvider (anyOf 1) | string | Alternative | One of: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness |
$ (allOf 2).defaultOnlineMeetingProvider (anyOf 2) | JSON | Alternative | |
$ (allOf 2).defaultOnlineMeetingProvider (anyOf 2) (anyOf 1) | object | Alternative | |
$ (allOf 2).defaultOnlineMeetingProvider (anyOf 2) (anyOf 2) | null | Alternative | |
$ (allOf 2).hexColor | JSON | Optional | |
$ (allOf 2).hexColor (anyOf 1) | string | Alternative | 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. |
$ (allOf 2).hexColor (anyOf 2) | null | Alternative | |
$ (allOf 2).isDefaultCalendar | JSON | Optional | |
$ (allOf 2).isDefaultCalendar (anyOf 1) | boolean | Alternative | true if this is the default calendar where new events are created by default, false otherwise. |
$ (allOf 2).isDefaultCalendar (anyOf 2) | null | Alternative | |
$ (allOf 2).isRemovable | JSON | Optional | |
$ (allOf 2).isRemovable (anyOf 1) | boolean | Alternative | Indicates whether this user calendar can be deleted from the user mailbox. |
$ (allOf 2).isRemovable (anyOf 2) | null | Alternative | |
$ (allOf 2).isTallyingResponses | JSON | Optional | |
$ (allOf 2).isTallyingResponses (anyOf 1) | boolean | Alternative | Indicates whether this user calendar supports tracking of meeting responses. Only meeting invites sent from users' primary calendars support tracking of meeting responses. |
$ (allOf 2).isTallyingResponses (anyOf 2) | null | Alternative | |
$ (allOf 2).name | JSON | Optional | |
$ (allOf 2).name (anyOf 1) | string | Alternative | The calendar name. |
$ (allOf 2).name (anyOf 2) | null | Alternative | |
$ (allOf 2).owner | JSON | Optional | 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. |
$ (allOf 2).owner (anyOf 1) | Model | Alternative | Expand Get calendar Permission — response body — @odata type, allowed Roles, email Address, is Inside Organization, is Removable, role email Address @odata type, address, name |
$ (allOf 2).owner (anyOf 2) | JSON | Alternative | |
$ (allOf 2).owner (anyOf 2) (anyOf 1) | object | Alternative | |
$ (allOf 2).owner (anyOf 2) (anyOf 2) | null | Alternative |
Referenced models: Get calendar Permission — response body — @odata type, allowed Roles, email Address, is Inside Organization, is Removable, role email Address @odata type, address, name, Get rule — response body — @odata type, id
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: microsoft.users_updatecalendargroups. Catalog operation: users_updatecalendargroups. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["Calendars.ReadWrite"]