-
Notifications
You must be signed in to change notification settings - Fork 741
User Deactivation API #9314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
User Deactivation API #9314
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fc2fa32
Create User Deactivation API doc
Karuna-Mendix 25c9151
Add sections: Introduction and Authentication
Karuna-Mendix f53d9f2
Added the sections: prerequisites and example
Karuna-Mendix 371dd98
Add yaml file
Karuna-Mendix b684b75
corrections
Karuna-Mendix 93a783a
Changing the tag
Karuna-Mendix 636b3d8
small changes
Karuna-Mendix 8fa70b4
Updates as per confluence draft
Karuna-Mendix 290c074
updated the yaml file
Karuna-Mendix b372bc5
removed "-test" from the yaml file
Karuna-Mendix 5c6f257
rate limiting added
Karuna-Mendix 937729d
Description on rate limiting
Karuna-Mendix 66c3075
Linked User Identifier and User Deactivation API
Karuna-Mendix c6d6b2a
Feedback comments
Karuna-Mendix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
78 changes: 78 additions & 0 deletions
78
content/en/docs/apidocs-mxsdk/apidocs/governance/user-deactivation-api.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
title: "User Deactivation API" | ||
linktitle: "User Deactivation API" | ||
url: /apidocs-mxsdk/apidocs/user-deactivation-api/ | ||
type: swagger | ||
description: "The User Deactivation API allows Mendix Admins to deactivate users within their company on the Mendix Platform." | ||
restapi: true | ||
weight: 112 | ||
--- | ||
|
||
{{% alert color="warning" %}} | ||
The User Deactivation API is available for Mendix Admins. | ||
{{% /alert %}} | ||
|
||
## Introduction | ||
|
||
The User Deactivation API allows Mendix admins to deactivate users within their company on the Mendix Platform. You can use this API to automate the Joiner, Mover, and Leaver (JML) processes. It can help manage access by revoking it for certain 'movers' and 'leavers' from the Mendix platform. Using this API may also help your company to contribute to compliance with its policies. | ||
Karuna-Mendix marked this conversation as resolved.
Show resolved
Hide resolved
Karuna-Mendix marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Note that this API only manages access to Mendix as a development platform. If you need to implement JML processes for end-users in your Mendix apps, it is recommended to add the [SCIM](/appstore/modules/scim/) module to your applications. | ||
|
||
Once you have deactivated users, they will no longer be able to log in to the Mendix platform or use the Mendix platform API with a Personal Access Token (PAT). | ||
|
||
As an alternative, you can use this API to deactivate platform users, instead of the deprecated User Management API. | ||
Karuna-Mendix marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Authentication | ||
|
||
Authentication for the User Deactivation API uses a personal access token (PAT). | ||
|
||
### Generating a PAT | ||
|
||
To generate a PAT, see the [Personal Access Tokens](/community-tools/mendix-profile/user-settings/#pat) section of *User Settings*. | ||
|
||
Select the following as **User Deactivation API** scopes: | ||
|
||
* `mx:user-deactivation:write` – to deactivate users | ||
|
||
Store the generated value `{GENERATED_PAT}` somewhere safe so you can use it to authorize your User Deactivation API. | ||
|
||
### Using the PAT | ||
|
||
Each request must contain an `Authorization` header with the value `MxToken {GENERATED_PAT}`. Here is an example: | ||
|
||
```http | ||
PATCH /v1/platform-users/user-status/{uuid} HTTP/1.1 | ||
Authorization: MxToken EKNJ…vk | ||
``` | ||
|
||
To authenticate calls when using the Open API specification below, click **Authorize** and use the value `MxToken {GENERATED_PAT}`. | ||
|
||
## Prerequisites | ||
|
||
You must have the UserID of the user you want to deactivate. Follow the steps below to retrieve the UUID of the user: | ||
|
||
1. The Mendix Administrator creates a Personal Access Token (PAT) via the Developer Portal, with the following scope: | ||
`mx:mxid3:user-identifiers:uuid:read` | ||
2. Invoke the User Identifier API to fetch the UUID based on the user's email address, using the PAT generated in the above step. | ||
|
||
## Examples | ||
|
||
### Using the API to Deactivate User | ||
|
||
{{% alert color="info" %}}Only Mendix Admins from the company have the authority to deactivate user.{{% /alert %}} | ||
|
||
The following steps lead to deactivate the user based on UUID provided as in {UUID}: | ||
|
||
1. Set up your authentication PAT. You must be a Mendix Admin. | ||
1. Create a request body containing the active status, provide a body like this: | ||
|
||
```json | ||
{ | ||
"active" : false | ||
} | ||
``` | ||
|
||
1. Call `GET /v1/platform-users/user-status/{UUID}` to deactivate the User with the provided {UUID}. | ||
Karuna-Mendix marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## API Reference | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.