---
sourceDocument: Yokohama ServiceNow AI Platform Capabilities
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/servicenow-platform

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Remove User from Group Azure AD activity

# Remove User from Group Azure AD activity {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The Remove User from Group activity removes an existing user from a security group in
Azure Active Directory.
To access this activity in the Workflow Editor, select the
Custom tab, and then navigate to Custom ActivitiesAzure AD. This activity was built with the [REST web service activity template](https://www.servicenow.com/docs/vKkdz2GCYAqrSF1gk41qoQ#t_CreateARESTWebServiceActivity "Use this procedure to create a custom REST web service Orchestration activity.").  
Important:  
The REST message used for this activity must be configured to use [OAuth 2.0](https://www.servicenow.com/docs/access?context=c_OAuthApplications&version=yokohama&pubname=yokohama-platform-security&ft:locale=en-US).

## Input variables

{#r_RemoveUserFromGroupAzureActivity__table_plm_mkc_p5__entry__2}

| Variable | Description |
|-|-|
| user_id | Object ID (GUID) of the user to be removed. |
| group_id | Object ID (GUID) of the target group. |
[Table 1. Remove User from Group input variables]

{#r_RemoveUserFromGroupAzureActivity__table_plm_mkc_p5}

## Output variables

{#r_RemoveUserFromGroupAzureActivity__table_x4v_4kc_p5__entry__2}

| Variable | Description |
|-|-|
| error | Returns the error string from the REST message. If there are no errors, this variable returns a null value. |
| body | Contains a string value representing the output from the REST message. |
| status_code | Contains the status code returned from the Web service. |
[Table 2. Remove User from Group output variables]

{#r_RemoveUserFromGroupAzureActivity__table_x4v_4kc_p5}

## Conditions

{#r_RemoveUserFromGroupAzureActivity__table_qj2_5kc_p5__entry__2}

| Variable | Description |
|-|-|
| Success | Activity removed the object ID from the security group. |
| Failure | Activity failed to update the group's membership, or the activity failed to connect to Azure AD. |
[Table 3. Remove User from Group conditions]

{#r_RemoveUserFromGroupAzureActivity__table_qj2_5kc_p5}

*[\>]: and then


