You can validate a user’s identity in a Torq workflow by triggering Entra ID authentication for that user.
In the following example, a user triggers a workflow from a Microsoft Teams message that validates the user's identity as a prerequisite for the other workflow to be executed.
Revalidate a user's identity via Entra ID
Step one: Create a webhook trigger integration in Torq
Navigate to the integration: Go to Build > Integrations > Trigger > Webhook and click Add Instance.
Configure the integration:
Give the integration a unique and meaningful name, such as
Entra ID Trigger MFA receiver.Click Accept raw HTTP requests.
Click Add.
Step two: Get the webhook URL
Download the workflow: Download the Entra ID trigger authorization code receiver workflow below.
Import the workflow: Navigate to Build > Workflows, click Import workflow, and select the workflow from your device.
Configure the trigger: Open the trigger, click Create Trigger > Webhook, and then select the integration instance you created earlier.
Copy the synchronous URL: Click Webhook URL, select Synchronous URL, and then copy the URL. You will need it later to create an Entra ID app in Azure.
Step three: Create an application in Microsoft Entra ID
Open Microsoft Azure: Navigate to your Azure portal and go to Azure services > Microsoft Entra ID.
Register a new application: Go to Manage > App registrations and click New registration if a relevant app assigned to an Azure resource does not exist.
Enter a unique and meaningful name.
Give the account
Accounts in this organization directory onlyaccess.Click Register.
Open API permissions: In the application, go to API permissions and click + Add a permission.
Add permissions: Select the Microsoft Graph API endpoint, click Delegated permissions, select User.Read permissions, and then click Add permissions.
Open Certificates & secrets: In the application, go to Manage > Certificates & secrets.
Create a client secret: Select the Client secrets tab and click New client secret.
Enter a meaningful description/name.
Select an expiration date according to your organization's best practices.
Click Add.
Copy the secret: Copy the client secret Value to save it for later. You will need it to create the Microsoft 365 steps integration in Torq.
Open Authentication (Preview): Go to Manage > Authentication (Preview) and click + Add Redirect URI.
Add redirect URI: Click Web, paste the synchronous URL you copied earlier as the Redirect URI, and then click Configure.
Copy the client and tenant IDs: Go to the application's Overview page and copy both the Application (client) ID and Directory (tenant) ID to save them for later. You will need them later to create the Microsoft 365 steps integration in Torq.
Step four: Create a Microsoft 365 steps integration in Torq
Navigate to the integration: In Torq, go to Build > Integrations > Steps > Microsoft 365 and click Add Instance.
Configure the integration:
Finalize: Click Add.
Step five: Create a workflow to authenticate with Entra ID
You now need to create a workflow that instructs the user to start the authentication process with Entra ID by generating the appropriate authentication URL. This URL must have the following format:
https://login.microsoftonline.com/<tenant ID>/oauth2/v2.0/authorize?response_type=code&client_id=<client ID>&redirect_uri=<redirect URI>&scope=offline_access%20user.read
The tenant ID, client ID, and redirect URI must be the Entra ID app values you generated earlier.
As an illustration, the following workflow uses a Microsoft Teams Bot trigger integration and adaptive card with an Action.OpenUrl button to present the authentication link to the user. An Until Break loop checks whether the Entra ID trigger authorization code receiver workflow successfully received and processed the user's authorization code.
Download the workflow: Download the Trigger Entra ID auth from Teams workflow below.
Import the workflow: Navigate to Build > Workflows, click Import workflow, and select the workflow from your device.
Run the workflow: Review the workflow's parameters and integrations and then execute it.


