I'm working on a notebook to migrate our organization's enterprise usernames over to email addresses (to facilitate Azure single sign-on). I have most of the kinks worked out, but the one thing I haven't been able to automate just yet is the licensing. I can't delete any users that have licenses assigned, and I want to assign the same licenses to the replacement username. My problem is that the license manager seems to think I don't have any licenses. However, when I go through the Portal GUI, I can see that I have licenses available and assigned for Pro, Insights, etc.
Here's an example of what I get when I try license.all() or license.get():
And here's what I get when I pull the provisions property for a user with Pro and Insights:
Does anyone have any thoughts? This is my first time working with the license manager, so it's entirely possible I've missed something obvious.