Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-O365BillingSubscriptions not returning subscribedSku #31

Open
LastElf opened this issue Oct 31, 2024 · 2 comments
Open

Get-O365BillingSubscriptions not returning subscribedSku #31

LastElf opened this issue Oct 31, 2024 · 2 comments

Comments

@LastElf
Copy link

LastElf commented Oct 31, 2024

First of all, thank you for the undocumented documentation. I've managed to build out a whole report of license info that we as an MSP can't get automated normally since it's locked to the CSP. However, I've spent the last few afternoons trying to reverse engineer this and I'm not getting any further so here I am. I've stripped out a few of the functions from the module that we need since we have Graph for everything else, but specifically to get license reseller I only needed some billing functions.

So I've made a function that gets the reseller licenses from the "https://admin.microsoft.com/fd/commerceMgmt/assets/crossmotion" endpoint and this works fine using similar logic to how you created the commercial one, and has a SkuID I can use to call it back to a consumed count for that Sku, however the commercial direct license version Get-O365BillingSubscriptions doesn't, even though the expand has it listed and I've matched almost every value from the devtools of loading the license view in my browser. The browser's payload and response shows the exact same info as the script version, all the same license and and billing IDs, just without subscribedSku as a property.

All I need is just a way to tie a Sku to a commercial order, any insight from your side? I know it's been a couple of years since you wrote it, but hopefully there's something I can work with.

@PrzemyslawKlys
Copy link
Member

Unfortunately, without running it, seeing the output, and testing it myself I will not be much help. My brain doesn't function that way and won't be able to see what you're seeing without actually playing with it. Do I need any specific setup for that endpoint to return data?

@LastElf
Copy link
Author

LastElf commented Nov 1, 2024

The only thing needed to test the Get-O365BillingSubscription function (The one in this repo's module, the endpoint I linked above is just me being too verbose with the issue I'm hitting, sorry) is a license that is listed as Commercial Direct in the billing page. The output results I get when converted to JSON and diffed are
image
Yes I know this is a deprovisioned license but shouldn't matter, it's just a tenant I have access to where this output difference is. Browser's request inspection in red, Get-O365 billing in green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants