Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Definition
https://www.yammer.com/api/v1/users/:user_id.json
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | Path | Yes | integer | The numeric ID of the user to suspend or delete. |
| delete | Query | No | boolean | If true, deletes the user's account instead of suspending it. This action is irreversible and cannot be undone by the user, an admin, or Microsoft Support. Defaults to false (suspend). |
| gdpr_delete | Query | No | boolean | If true, triggers the GDPR user deletion workflow. This removes the user’s personal data (PII) and references across Viva Engage systems and anonymizes authored content (messages remain but are no longer attributable to the user). The request is processed asynchronously and may take up to 14 days to fully propagate across all systems. This action is irreversible and cannot be undone by the user, an admin, or Microsoft Support. Defaults to false. |
Documentation
Suspend or delete a user. The current user must be an admin or a verified admin in a Viva Engage network to perform this action.
The behavior of the endpoint depends on the query parameters supplied:
- No parameter — suspends the user. The user may reactivate through the website if they retain access to a company email address.
delete=true— deletes the user's account. The user cannot self-reactivate.gdpr_delete=true— submits a GDPR deletion request. Asynchronously erases the user’s PII across systems and anonymizes authored content (messages remain but are no longer attributable). Returns202 Acceptedand is processed asynchronously.
Note: GDPR deletion does not delete messages authored by the user. Message deletion must be performed separately using the message delete API if required.
Caution
User lifecycle management should generally be performed through the Microsoft 365 Admin Center or Microsoft Entra.
API-based user deletions may lead to unrecoverable data loss and are therefore not recommended. Proceed only after carefully evaluating the impact.
This API is intended for automation scenarios where programmatic control is required.
Suspension of users may impact Viva Engage usage, as users must sign in again to reactivate their profile.
Both delete=true and gdpr_delete=true are irreversible and cannot be undone by the user, an admin, or Microsoft Support.
Response codes
| Status | Meaning |
|---|---|
200 OK |
Suspension or deletion completed synchronously (applies to delete=true and the default suspend flow). |
202 Accepted |
GDPR deletion request was successfully submitted and queued for asynchronous processing. Applies to gdpr_delete=true. |
400 Bad Request |
Invalid user ID or malformed request. |
401 Unauthorized |
The authentication token is missing, invalid, or expired — or a deletion request for this user has already been submitted. |
403 Forbidden |
The authenticated caller does not have permission to delete the user (must be an admin, or a verified admin in a paid network). |