> For the complete documentation index, see [llms.txt](https://docs.skeddly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skeddly.com/resources/users/detachmanagedpolicy-method.md).

# DetachManagedPolicy Method

## Description

Detaches a Skeddly managed policy from a user.

## HTTP Request

`PUT https://api.skeddly.com/api/Users/{id}/DetachManagedPolicy`

## URL Parameters

### id

ID of the user from which the managed policy is to be detached.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### managedPolicyId

ID of the managed policy to detach.

Type: `string`

Required: Yes

### projectId

ID of the project under which the policy is to be detached from the user.

Type: `string`

Required: No

## Returns

A [User](/data-types/user-object.md) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Users/u-00000001/DetachManagedPolicy HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "managedPolicyId": "full"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Users/u-00000001/DetachManagedPolicy" \
  -H "Authorization: AccessKey <api key>" \
  -d managedPolicyId=full
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "emailAddress": "user@example.com",
    "lastAccessDate": "2016-06-09T11:00:00Z",
    "managedPolicies": [
        {
            "managedPolicyId": "standard",
            "name": "Standard Access"
        }
    ],
    "mfaType": "none",
    "status": "disabled",
    "userId": "u-00000001",
    "username": "user1"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.skeddly.com/resources/users/detachmanagedpolicy-method.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.
