[REWST - TASK] M365/On-Prem: Gather User Details
This workflow functions as a critical automation building block that retrieves comprehensive user information from both Microsoft 365 and on-premises Active Directory environments, serving as a foundation for more complex user management automations. For MSPs, this workflow is particularly valuable in hybrid environment management scenarios, including user onboarding/offboarding processes, troubleshooting access issues, and preparing documentation for compliance audits—all without requiring technicians to manually query multiple systems. Technically, the workflow validates input parameters, determines whether to query cloud or on-premises environments (or both), leverages Microsoft Graph API for cloud data, executes PowerShell via RMM for on-premises information, and then formats everything into standardized output that can be consumed by other workflows or ticketing systems.
This workflow contains 10 tasks.
Inputs
rmm_site - string
Provide the RMM site ID (optional)
aad_user_guid - string
Please provide the Entra/AzureAD user's unique GUID
on_prem_upn_or_sam - string
Please provide the on prem AD user's UPN or samAccountName
Outputs
automation_log: Standardized Rewst automation log
success: Boolean; States if workflow was successful.
output: Dictionary object containing an azure_user dictionary (if applicable) and on_prem_user dictionary (if applicable). These objects will contain information about the user.
Key tasks
get_aad_user_details: Data retrieval
verify_inputs: Core integration: noop
check_for_on_prem: Validation/verification
check_for_azure: Validation/verification
format_on_prem_user: Core integration: noop
Jinja examples
Example 1
Used in publishing 'automation_log'
Example 2
Used in publishing 'automation_log'
Last updated
Was this helpful?