[REWST - TASK] M365 Licensing
This workflow streamlines Microsoft 365 license management by handling license purchases, user assignments, and license group updates, all in one automated process. It’s especially useful in broader workflows like employee onboarding, where M365 licensing needs to happen automatically.
MSPs can use it to standardize how licenses are managed across clients, cut down on manual work, and make sure users get the right licenses every time. Behind the scenes, the workflow takes care of three main tasks: buying the needed M365 licenses, assigning them to users via Microsoft Graph, and adding users to the right license groups. Centralizing these steps helps prevent common mistakes and keeps a clean audit trail of all licensing activity.
This workflow contains 7 tasks.
Inputs
last_name - string
User's Last Name
Default:
{{ CTX.last_name|d }}
ticket_id - string
If ticket id provided, will update based on licensing actions performed
Default:
{{ CTX.ticket_id|d }}
first_name - string
User's Last Name
Default:
{{ CTX.first_name|d }}
gbl_groups - array
List of groups for Group Based LIcensing
Default:
{{ CTX.gbl_groups|d([]) }}
aad_user_id - string
User ID for Azure Active Directory
Default:
{{ CTX.aad_user_id|d }}
usage_location - string
Updates User's Usage Location in AAD
Default:
{{ CTX.usage_location|d }}
license_subscription - string
Subsubscription ID for Microsoft 365
Default:
{{ CTX.license_subscription|d }}
m365_direct_licenses - array
List of M356 Direct LIcenses to be assigned
Default:
{{ CTX.m365_direct_licenses|d([]) }}
m365_primary_license - string
Assign M356 Primary License to user when set; This is largely for legacy functionality and is usually left empty.
Default:
{{ CTX.m365_primary_license|d }}
Outputs
automation_log: Standardized Rewst automation log
Key tasks
assign_m_365_license_to_graph_user_items: Workflows integration: [REWST - TASK] M365: Purchase Licenses
assign_m_365_license_to_graph_user_single: Workflows integration: [REWST - TASK] M365 Licensing: Assign License to Graph User
failure_catch: Core integration: noop
add_user_to_licence_group: Workflows integration: [REWST - TASK] M365 Licensing: Add User to License Group
M365 Licensing: Core integration: noop
Jinja examples
Example 1
Used as input for input field user
in task assign_m_365_license_to_graph_user_items
Example 2
Used as input for input field ticket_id
in task assign_m_365_license_to_graph_user_items
Last updated
Was this helpful?