Microsoft Entra
Microsoft Entra integration for identity lifecycle, group membership, and OAuth token operations.
Connectors
Choose the connector that matches your authentication method. The options below use the names shown in StackAI.
Microsoft Entra
Credentials
Microsoft Entra Identity (OAuth2)
OAuth sign-in
Microsoft Entra (OAuth2, Legacy)
OAuth sign-in
Microsoft Entra
Connect to Microsoft Entra to perform authentication operations(exchange tokens, get access tokens, etc.).
Set up in Microsoft Entra
Grant the app the Microsoft Graph application permissions your workflows need, then grant admin consent for the tenant.
Assign the app registration itself a Microsoft Entra directory role. Application permissions alone do not authorize user lifecycle writes; password and account changes need at least User Administrator.
Copy the Tenant ID, Client ID, and a Client Secret from the app registration.
Set up in StackAI
Open Settings → Connections, add a connection, and select Microsoft Entra.
Enter the credentials and connection details in the fields below.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
Connection fields
Client Secret
Yes
Paste the secret Value from Microsoft Entra, not the Secret ID. Provider instructions.
Provider documentation: Setup reference.
Microsoft Entra Identity (OAuth2)
Connect to Microsoft Entra with directory write access for identity lifecycle work: provisioning and deactivating accounts, resetting passwords and multifactor methods, managing groups, and assigning application access. Requires tenant administrator consent and a Microsoft Entra directory role.
Set up in Microsoft Entra
Sign in with a Microsoft work or school account that holds a Microsoft Entra directory role.
Confirm the signing-in account holds the directory role each operation needs: User Administrator for account and password changes, Authentication Administrator for multifactor methods, Groups Administrator for groups, and Cloud Application Administrator for application assignment. Consent alone does not grant these.
Set up in StackAI
Open Settings → Connections, add a connection, and select Microsoft Entra Identity (OAuth2).
Select Connect, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.
Provider documentation: Setup reference.
Microsoft Entra (OAuth2, Legacy)
Legacy connector for reading directory data and managing group membership. It cannot perform identity lifecycle work such as creating or deactivating accounts, resetting credentials, or assigning application access. Existing connections keep working; for new setups use Microsoft Entra Identity (OAuth2).
Set up in Microsoft Entra
Use a Microsoft Entra account with access to the records and operations that your workflow needs.
If your organization restricts application access or user consent, have its administrator approve the connection before you sign in.
Set up in StackAI
Open Settings → Connections, add a connection, and select Microsoft Entra (OAuth2, Legacy).
Select Connect, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.
Provider documentation: Setup reference.
Verify the connection
Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.
If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.
Detailed setup guides
Use an action
Add the required Microsoft Entra action to the workflow.
Select a connection when the action requests one.
Complete the required fields. Use the reference picker when a value comes from another workflow step.
Run the workflow and inspect the action’s output. Check the result before using it in a later step.
Actions
Get Token
Get an OAuth access token from Microsoft Entra
Inputs
Scope
string
No
The OAuth scope to request for the token.
Username
string
No
The username or email address for authentication.
Password
secret
No
The password for authentication.
Request Refresh Token
boolean
No
When enabled, adds 'offline_access' scope to request a refresh token. Note: This may fail if your Azure AD app registration doesn't have the 'offline_access' permission granted, or if Conditional Access policies block refresh tokens. Default: false.
Outputs
Access Token
string
The OAuth access token (JWT).
Token Type
string
The type of token issued.
Expires In
integer
Token validity duration in seconds.
Extended Expires In
integer
Extended token validity duration in seconds.
Scope
string
The scopes the access token is valid for.
Refresh Token
string
OAuth refresh token for obtaining new access tokens.
ID Token
string
JWT containing claims about the authenticated user.
Exchange Token
Exchange an access token for another using On-Behalf-Of flow
Inputs
Scope
string
No
The OAuth scope to request for the new token.
Assertion Token
textarea
No
The access token to exchange (JWT assertion_token).
Outputs
Access Token
string
The new OAuth access token (JWT).
Token Type
string
The type of token issued.
Expires In
integer
Token validity duration in seconds.
Extended Expires In
integer
Extended token validity duration in seconds.
Scope
string
The scopes the access token is valid for.
Refresh Token
string
OAuth refresh token for obtaining new access tokens.
ID Token
string
JWT containing claims about the authenticated user.
Refresh Token
Get a new access token using a refresh token
Inputs
Refresh Token
textarea
No
The refresh token from a previous Get Token call.
Scope
string
No
The OAuth scope to request for the new token.
Outputs
Access Token
string
The new OAuth access token (JWT).
Token Type
string
The type of token issued.
Expires In
integer
Token validity duration in seconds.
Extended Expires In
integer
Extended token validity duration in seconds.
Scope
string
The scopes the access token is valid for.
Refresh Token
string
New refresh token (tokens rotate with each use).
ID Token
string
JWT containing claims about the authenticated user.
List Members
List members of a Microsoft Entra group
Inputs
Group
select (string)
Yes
Select the Microsoft Entra group to inspect, or enter the group ID manually. Options load from the selected connection.
Limit
integer
No
Maximum number of members to retrieve from the first results page only. Defaults to 100. Default: 100.
Outputs
Members
dict_array
Member display names and email addresses.
Total Count
integer
Number of members returned.
Add Members
Add one or more members to a Microsoft Entra group
Inputs
Group
select (string)
Yes
Select the Microsoft Entra group that should receive members, or enter the group ID manually. Options load from the selected connection.
Members
array
Yes
One or more user mail addresses or user principal names to add.
Outputs
Added Members
dict_array
Members added to the group (display name and email only).
Failed Members
dict_array
Members that could not be added and the reason for each failure.
Remove Members
Remove one or more members from a Microsoft Entra group
Inputs
Group
select (string)
Yes
Select the Microsoft Entra group to remove members from, or enter the group ID manually. Options load from the selected connection.
Members
multiple_select (string)
Yes
Select one or more members from the chosen group, or enter email/UPN manually. The dropdown shows only the first 100 members. Options load from the selected connection.
Outputs
Removed Members
dict_array
Members removed from the group (display name and email only).
Failed Members
dict_array
Members that could not be removed and the reason for each failure.
Create User
Provision a new Microsoft Entra user. A random initial password is set and never revealed, so give the user a password reset email or phone so they can collect it through self-service password reset.
Inputs
Display Name
string
Yes
The name shown for this user in Microsoft Entra.
User Principal Name
string
Yes
The sign-in address for the new user. The domain must be verified in your tenant.
Mail Nickname
string
No
Mail alias for the user. Defaults to the part of the sign-in address before the @ sign.
Job Title
string
No
The new user's job title.
Department
string
No
The new user's department.
Password Reset Email
string
No
An alternate email address to register as a password reset method, so the new user can collect their own password.
Password Reset Phone
string
No
A mobile number the user can use for self-service password reset.
Account Enabled
boolean
No
Whether the account can sign in as soon as it is created. Default: true.
Outputs
User
object
The Microsoft Entra user after the operation.
Registered Reset Methods
string_array
Password reset methods registered for the user. Empty means the user cannot yet recover the account on their own.
Password Set
boolean
Whether an initial password was set on the account.
Force Password Change
boolean
Whether the user must change their password at first sign-in.
Deactivate User
Disable a Microsoft Entra user account so the user cannot sign in
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Outputs
User
object
The Microsoft Entra user after the operation.
Enable User
Enable a Microsoft Entra user account so the user can sign in again
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Outputs
User
object
The Microsoft Entra user after the operation.
Update User Profile
Update department, manager, phone, address, and other profile fields
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Job Title
string
No
The user's job title. Leave empty to keep the current value.
Department
string
No
The user's department. Leave empty to keep the current value.
Office Location
string
No
The user's office location. Leave empty to keep the current value.
Mobile Phone
string
No
The user's mobile number, as directory contact information. Leave empty to keep the current value.
Street Address
string
No
The user's street address. Leave empty to keep the current value.
City
string
No
The user's city. Leave empty to keep the current value.
State
string
No
The user's state or province. Leave empty to keep the current value.
Postal Code
string
No
The user's postal code. Leave empty to keep the current value.
Country
string
No
The user's country. Leave empty to keep the current value.
Manager
string
No
The manager's mail address, user principal name, or object ID. Microsoft Graph sets the manager through a separate call. Leave empty to keep the current value.
Outputs
User
object
The Microsoft Entra user after the operation.
Revoke Sessions
Sign a Microsoft Entra user out of every device and application. The user must sign in again everywhere.
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Outputs
User ID
string
Object ID of the user whose sessions were revoked.
Sessions Revoked
boolean
Whether Microsoft Entra accepted the session revocation.
List MFA Methods
List the multifactor authentication methods a Microsoft Entra user has registered, such as Authenticator, phone, or a security key
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Outputs
Authentication Methods
dict_array
Multifactor methods the user has registered.
Total Count
integer
Number of registered multifactor methods.
Reset MFA Methods
Remove every multifactor method a user has registered so they must set up multifactor authentication again at their next sign-in. This cannot be undone.
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Outputs
Deleted Methods
dict_array
Methods removed from the user.
Skipped Methods
dict_array
Methods that were not removed, and why.
Reset Password
Reset a user's password to a new random value and require them to change it at next sign-in. The new password is never shown, so the user recovers it through self-service password reset. This also clears a smart lockout.
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Outputs
User ID
string
Object ID of the user whose password was reset.
Password Reset
boolean
Whether Microsoft Entra confirmed the password was reset.
Force Password Change
boolean
Whether the user must choose a new password at next sign-in.
Assign App Access
Grant a Microsoft Entra user access to an enterprise application
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Application
select (string)
Yes
Select the enterprise application, or enter its service principal object ID. Options load from the selected connection.
Application Role
select (string)
No
The role to grant within the application. Leave empty for default access when the application exposes no roles. Options load from the selected connection.
Outputs
Assignment ID
string
ID of the assignment, needed to revoke it later.
User ID
string
Object ID of the user who was granted access.
Application
string
Name of the application the user was granted access to.
Revoke App Access
Remove a Microsoft Entra user's access to an enterprise application. This does not sign the user out of sessions they already hold.
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Application Assignment
select (string)
Yes
The application assignment to remove. Choose from the user's current assignments, or enter an assignment ID. Options load from the selected connection.
Outputs
User ID
string
Object ID of the user whose access was revoked.
Assignment ID
string
The assignment that was removed.
Access Revoked
boolean
Whether Microsoft Entra removed the assignment.
Get User Access
List the enterprise applications and licences assigned to a Microsoft Entra user, for an access review or before offboarding
Inputs
User
select (string)
Yes
Select the Microsoft Entra user, or enter a mail address, user principal name, or object ID. Options load from the selected connection.
Outputs
User ID
string
Object ID of the user.
Applications
dict_array
Enterprise applications the user is assigned to.
Licenses
dict_array
Licences assigned to the user.
Create Group
Create a Microsoft Entra security group or Microsoft 365 group, then add members to it with Add Members
Inputs
Group Name
string
Yes
The name shown for this group in Microsoft Entra.
Group Type
select (string)
No
A security group controls access to resources. A Microsoft 365 group also gets a shared mailbox and calendar. Available values: Security group, Microsoft 365 group. Default: security.
Mail Nickname
string
No
Mail alias for the group. Defaults to the group name with spaces removed.
Owner
string
No
The user who will own the group, as a mail address, user principal name, or object ID. Required for a Microsoft 365 group on a credentials connection, which has no signed-in user to own it.
Description
string
No
What this group is for.
Outputs
Group ID
string
Object ID of the created group.
Group Name
string
Name of the created group.
Mail Address
string
Mail address of the group. Only Microsoft 365 groups get one.
Delete Group
Delete a Microsoft Entra group. Microsoft 365 and security groups move to deleted items and can be restored for 30 days; distribution groups are removed immediately. Check Recoverable For (Days) in the result.
Inputs
Group
select (string)
Yes
Select the Microsoft Entra group to delete, or enter the group ID manually. Options load from the selected connection.
Outputs
Group ID
string
Object ID of the deleted group.
Deleted
boolean
Whether Microsoft Entra deleted the group.
Recoverable For (Days)
integer
How long the group can still be restored from deleted items before Microsoft Entra removes it permanently.
Important behavior
If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.
Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.
The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.
Last updated
Was this helpful?

