---
title: "Update existing Office 365 instance."
method: PATCH
path: "/api/v2/office365s/{office365_id}"
tags: ["Office 365"]
---

# Update existing Office 365 instance.

`PATCH /api/v2/office365s/{office365_id}`

## Request

- Base URL: `https://console.jumpcloud.com`
- URL: `https://console.jumpcloud.com/api/v2/office365s/{office365_id}`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/docs/api/v2/office365s/:office365_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows updating some attributes of an Office 365 instance.

#####

Sample Request

```
curl -X PATCH https://console.jumpcloud.com/api/v2/office365s/{OFFICE365_ID} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
    "userLockoutAction": "maintain",
    "userPasswordExpirationAction": "suspend",
  }'
```

Sample Request, set a default domain

```
curl -X PATCH https://console.jumpcloud.com/api/v2/office365s/{OFFICE365_ID} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
    "defaultDomain": {
        "id": "{domainObjectID}"
      }
  }'
```

Sample Request, unset the default domain

```
curl -X PATCH https://console.jumpcloud.com/api/v2/office365s/{OFFICE365_ID} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
    "defaultDomain": {}
  }'
```

## Headers

- `x-org-id` string

## Request body

- Office365
  - `id` string
  - `userLockoutAction` 'suspend' | 'maintain'
  - `userPasswordExpirationAction` 'suspend' | 'maintain'
  - `name` string
  - `groupsEnabled` boolean
  - `defaultDomain` DefaultDomain, nullable
    - `id` string
    - `domain` string

## Response `200`

- Office365
  - `id` string
  - `userLockoutAction` 'suspend' | 'maintain'
  - `userPasswordExpirationAction` 'suspend' | 'maintain'
  - `name` string
  - `groupsEnabled` boolean
  - `defaultDomain` DefaultDomain, nullable
    - `id` string
    - `domain` string

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/revisions/f396d9271b46?raw)
