Link Search Menu Expand Document

Azure AD - Get New Users

Workflow #0036

This workflow checks for users that were created within the past X hours (the timeframe is configurable). If any results are found, the user list is aggregated and a Webex Teams message is sent. Required Graph API permissions: AuditLog.Read.All



  • The following atomic actions must be imported before you can import this workflow:
  • The targets and account keys listed below
  • An Azure Active Directory instance
  • An Azure App Registration with the AuditLog.Read.All API permission
  • (Optional) A Webex Teams access token and room name to post messages to

Note: You may have an old version of the Webex Teams - Post Message to Room atomic. To ensure the best experience with this workflow, be sure to import the latest version of this atomic from the GitHub_Target_Atomics repository!

Workflow Steps

  1. Fetch global variables
  2. Get an access token for the Graph API
  3. Calculate and format the start date
  4. Fetch audit log events for user creation
  5. Check if the request was successful:
    • If not, return an error message
    • If it was, parse the event JSON and aggregate the list of new users in text form for Webex. If there’s anything to report, send a Webex message


  • If you want the workflow to run on a schedule, you need to create a schedule and then add it as a trigger within the workflow
  • Set the Azure Tenant ID local variable to the Azure tenant to run the report for
  • Set the Hours to Check to how many hours ago you want the workflow to look for events (default: 24 hours). If you’re using a schedule to run this workflow, make sure the schedule’s interval matches this timeframe
  • See this page for information on configuring the workflow for Webex Teams


Target Group: Default TargetGroup

Target Name Type Details Account Keys Notes
Microsoft Graph HTTP Endpoint Protocol: HTTPS
Path: /v1.0
Microsoft Graph Token HTTP Endpoint Protocol: HTTPS
Path: None
Microsoft Graph API  
Webex Teams HTTP Endpoint Protocol: HTTPS
Path: None
None Not necessary if Webex Teams activities are removed

Account Keys

Account Key Name Type Details Notes
Microsoft Graph API HTTP Basic Authentication Username: Client ID
Password: Client Secret