Purpose
Show you how to use Workflow’s HTTP Request Action to Work With IdentityNow APIs.
Configuration Steps
- Get a Personal Access Token (PAT) to call IdentityNow APIs.
- Trigger a workflow when an identity’s lifecycle state changes.
- Add a workflow action to get an identity’s AD account.
- Add a workflow action to send an email with AD account info.
Get a Personal Access Token (PAT) to call IdentityNow APIs.
- Select your name in the top-right corner.
- Select the Preferences menu.
- Select the Personal Access Tokens menu.
- Copy your
Secret
andClient ID
into a safe place (you’ll need this later).
Trigger a workflow when an identity’s lifecycle state changes.
Add an Identity Attributes Changed trigger and set Attribute to Filter: cloudLifecycleState
.
Add a workflow action to get an identity’s AD account.
Add an HTTP Request action and set the following attributes (leave all other fields blank):
- Authentication Type:
OAuth 2.0 - Client Credentials Grant
- Token URL:
https://TENANT.api.identitynow.com/oauth/token
, replacingTENANT
with your tenant name - Client ID: Obtained above
- Client Secret: Obtained above
- Credential Location:
Header
- Request URL:
https://TENANT.api.identitynow.com/v3/accounts
, replacingTENANT
with your tenant name - Query Parameters:
filters:identityId eq "{{$.trigger.identity.id}}"
filters:sourceId eq "<SOURCE ID>" // ID for your Active Directory source.
- Method:
GET
- Request Content Type:
JSON
Add a workflow action to send an email with AD account info
Add a Send Email action and set the following attributes (leave all other fields blank/default):
- Recipient Email Address: an email address of your preference
- Subject:
Lifecycle State Changed, Check AD Account
- Body:
Dear Admin,<br><p>An identity's lifecycle state has changed. Please check their AD account:</p>${accountName}
- Templating Context:
{"accountName.$":"$.hTTPRequest.body[0].name"}
Don’t forget to add an End Step - Success
!
Outcome
Once you save and enable the workflow, the target address will receive this email each time an identity’s lifecycle state changes. Hope you found this helpful!