Azure AD Authentication
This section provides instructions on how to configure WorkflowGen delegated authentication with Azure AD authentication via the Microsoft Identity Platform v2.0 or API endpoint v1 providers, and will show you how to set up a working WorkflowGen instance that uses Azure to authenticate your users.
In the instructions, substitute
<workflowgen url>
with the domain and path to your WorkflowGen instance; for example, localhost/wfgen
or www.mycompany.com/wfgen
.- Make sure to have a licensed copy of WorkflowGen installed and running on an IIS web server in HTTPS secure connection mode.
- You must be a WorkflowGen administrator.
- Make sure to have Azure AD administrator access to be able to configure Azure AD.
- Make sure to have provisioned an existing Azure AD user that you can authenticate with WorkflowGen and that the user has WorkflowGen administrator permissions. This is important because once you've activated the delegated authentication with Azure AD, you'll still need to be able to manage the WorkflowGen web application.
- AES encryption mode and its key are required for the authentication to work.
The configuration of Azure AD is done in two parts. First, you have to register the WorkflowGen web application and link it to your instance of WorkflowGen; then, you have to register the WorkflowGen GraphQL API in order to be able to register other custom applications to access it.
- 1.In the Azure portal, click App registrations in the Azure Active Directory section.
- 2.Click New registration, and fill in the properties form:
- Name:
WorkflowGen Web app
- Supported account type:
Account in this organizational directory only (Single tenant)
✏️ Note: Depending on the context, you should choose the right option for your use case for the Supported account type value. - Redirect URI:
- Type:
Web
- Value:
https://<workflowgen url>/auth/callback
📌 Example:https://mycompany.com/wfgen/auth/callback
- 3.Click Register at the bottom of the page.
You should now see the
WorkflowGen Web app
application registration's Overview page.Now, you have to generate a client secret to be used by the WorkflowGen OIDC authentication module.
- 1.Click Certificates & secrets.
- 2.In the Client secrets section, click New client secret.
- Description:
My secret
, or something to know that this is the client secret. - Expires: Choose 24 months or your desired expiration period.
- 3.Click Add.
- 4.The auto-generated client secret is now displayed under the Value column. Copy the client secret value and save it somewhere safe, since you won't be able to retrieve it afterwards.
Since the latest Azure portal update, it's no longer possible to set client secrets to never expire. You'll need to manually regenerate a new client secret every two years (if the 24 months option was selected) before it expires. Then, update the client secret used by WorkflowGen instance in its web configuration file (
ApplicationSecurityAuthClientSecret
key).In order for the communication between the WorkflowGen instance and Azure to work, you need to add one more authorized redirect URI to the
WorkflowGen Web app
application registration.- 1.Click Authentication.
- 2.In the Redirect URIs section, click Add URI.
- 3.Enter the following information:
- Redirect URI:
https://<workflowgen url>/auth/logout/return
📌 Example:https://mycompany.com/wfgen/auth/logout/return
✏️ Note: You should also seehttps://<workflowgen url>/auth/callback
in this list.
- 4.Click Save at the top of the section.
If you don't need WorkflowGen GraphQL API access, you can skip this application registration and configuration in Azure (steps 4 through 6). In this case, continue the configuration procedure from Review the registrations through WorkflowGen configuration completely. Finally, follow the configuration in the Configuring the authentication without the GraphQL API section.
In order to expose the WorkflowGen GraphQL API, you need to add a new application registration in Azure AD that will represent it. To do this:
- 1.In the Azure portal, click App registrations in the Azure Active Directory section.
- 2.Click New registration, and fill in the properties form:
- Name:
WorkflowGen GraphQL API
- Supported account type:
Account in this organizational directory only (Single tenant)
- Redirect URI: Leave this blank.
- 3.Click Register at the bottom of the page.
You've now successfully registered the
WorkflowGen GraphQL API
application in Azure AD.- 1.Click Expose an API.