# Squads.Members

## Overview

### Available Operations

* [update](#update) - Update Squad Member

## update

This endpoint is used to update a squad member's role and is only accessible if your organization is using the OBAC permission model.

If you're attempting to update a member's role from 'owner' to 'member', and that 'owner' is the last squad owner, then the 'replaceWith' query parameter is required. Setting 'replaceWith' to 'member' will promote the member to the role of owner.

Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header with `squad-create` scope.

### Example Usage

```python
from squadcast import SquadcastSDK


with SquadcastSDK(
    refresh_token_auth="<YOUR_REFRESH_TOKEN_AUTH_HERE>",
) as squadcast_sdk:

    res = squadcast_sdk.squads.members.update(squad_id="<id>", member_id="<id>", replace_with="<value>", role="<value>")

    # Handle response
    print(res)

```

### Parameters

| Parameter      | Type                                                                          | Required             | Description                                                         |
| -------------- | ----------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `squad_id`     | *str*                                                                         | :heavy\_check\_mark: | N/A                                                                 |
| `member_id`    | *str*                                                                         | :heavy\_check\_mark: | N/A                                                                 |
| `replace_with` | *str*                                                                         | :heavy\_check\_mark: | N/A                                                                 |
| `role`         | *str*                                                                         | :heavy\_check\_mark: | N/A                                                                 |
| `retries`      | [Optional\[utils.RetryConfig\]](/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.V4SquadsUpdateSquadMemberResponse**](/python-sdk/docs/models/v4squadsupdatesquadmemberresponse.md)

### Errors

| Error Type             | Status Code                       | Content Type     |
| ---------------------- | --------------------------------- | ---------------- |
| errors.CommonV4Error   | 400, 401, 402, 403, 404, 409, 422 | application/json |
| errors.CommonV4Error   | 500, 502, 503, 504                | application/json |
| errors.SDKDefaultError | 4XX, 5XX                          | \*/\*            |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/sdks/squadsmembers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
