Automating removal of user licenses.
In my opinion, this
is a must. The logic is simple, you identify inactive users and either remove
them or assign them a free Stakeholder license, and save money.
Tip 1 : There are several options from which you can choose to run the automation, below are some of them:
- As a script that you run manually.
- Automate using Azure Pipelines
- Automate using Azure Functions
Here is one of the
approaches we are following, which makes use of Rest APIs for Azure DevOps and
Azure Functions.
This is a graceful
approach where the users will be notified about their license getting
downgraded. They will also have the choice to login to ADO within a specified
time to retain their license. The Axure Function is timer triggered - you can
choose to keep the "notifying the users" logic and
"removal" logic in the same function or separate functions.
During the
notification flow:
- Get the list of users using ADO Rest API, and find the list of users who:
- have not accesses in the last x days and
- holds a Basic or Basic + Test Plans license type.
You
can decide on the value of x, probably keep it somewhere around 30-45 days.
- Send an email out to these users saying that since they have not access ADO for x days, their license will be downgraded to Stakeholder. Also provide them an option to avoid the downgrade by giving them a buffer of a few days, within which they should login to ADO so that the last accessed date gets updated.
- Store the user list.
For the removal
flow, :
- Check if the user list stored from step 3 in the first execution has users. If yes, then clean the list up, by either retaining their licenses if they had logged in during the buffer period or downgrading them to Stakeholder if they had not. The list will be empty by the end of this step.
- Get the next list of inactive users.
- Load the next set of inactive users to the list after sending them the warning emails.
This process
continues.
Tip 2: Dealing Basic + Test Plan licenses separately.
Since the Basic +
Test Plans license is way costlier compared to Basic, you can even think of
downgrading them to Basic sooner.
There are some blog
posts out there explaining how to do this. One of my colleagues is also working
on putting a post together with the details, I'll add it here as soon as it
goes live.
Cheers!
Comments
Post a Comment