Spanning Backup for Microsoft 365 offers a public API, which you can use to automate license assignment. If you have a large number of Spanning licenses to assign at once you can use PowerShell to assign users in batches using CSV files*. You can also make AzureAD requests and enable users directly based on Active Directory User attributes.
Spanning has a PowerShell module that you can use to complete this process, which can be found here. Additionally, please watch this instructional video which details how to use the PowerShell module.
*Spanning recommends enabling users in O365 in batches of 250-500 per day to avoid throttling by Microsoft. Monitor users for initial backup completion before enabling more. Enabling significant numbers of users concurrently for initial on-boarding will work, but may result in extended backup times due to API throttles Microsoft enforces from their end which Spanning cannot control.
If you have any additional questions, please contact Spanning Support - we're always happy to help!