---
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


---

# Get User Info Azure AD activity

# Get User Info 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 Get User Info activity returns the named user's information from the 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.").{#r_GetUserInfoAzureADActivity__p_AzureADAccess}  
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_GetUserInfoAzureADActivity__table_nh4_gmx_45__entry__2}{#r_GetUserInfoAzureADActivity__e_ObjectIDDesc}

| Variable | Description |
|-|-|
| user_id | The object ID (GUID) or the user principal name of the target user. An example of a user principal name is someuser@a830edad9050849NDA1.onmicrosoft.com Note: Version 2 of this activity enforces input validation. If empty, the following message appears: "Mandatory input 'user_id' is empty". |
[Table 1. Check If User Exists input variables]

{#r_GetUserInfoAzureADActivity__table_nh4_gmx_45}

## Output variables

{#r_GetUserInfoAzureADActivity__table_mr4_jmx_45__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. |
| user_info | The user_info array contains attributes that can be leveraged by other activities as inputs. For example, the user objectid output (GUID) can be passed to the Add User to Group activity as the user_id input. * objectid: User's Azure AD identifier. * accountEnabled: Boolean variable indicating whether the user's account is active or inactive. * displayName: Users display name, such as jacinto.gawron. * userPrincipalName: User's name in email format, such as jacinto.gawron@wammo.com. * mailNickname: User's email alias. {#r_GetUserInfoAzureADActivity__ul_uqf_gqx_45} |
[Table 2. Check If User Exists output variables]

{#r_GetUserInfoAzureADActivity__table_mr4_jmx_45}

## Conditions

{#r_GetUserInfoAzureADActivity__table_yxn_nmx_45__entry__2}

| Condition | Description |
|-|-|
| User exists | Activity found the named user. |
| User does not exist | Activity was unable to find the named user in the customer tenant domain. |
| Failure | Activity failed to connect to Azure AD. |
[Table 3. Check If User Exists conditions]

{#r_GetUserInfoAzureADActivity__table_yxn_nmx_45}

*[\>]: and then


