Automate Office 365 License Change

Automate Office 365 License Change

My organisation are looking to automate the removal of Inactive User accounts and as a part of this process would like to downgrade the assigned Office 365 license for a period of 30 days before the license is removed completely.
Is this possible as I've not been able to find a way to do this without using a custom Powershell script?

                New to ADSelfService Plus?