6. This should output an Access Token for Microsoft 365 to a text file in the same location for our reference - open the text file and replace 'string from text file' in the next command with our token
7. This should then run the Get-O365Licenses method from the Logic.ps1 file and send the output to an output.txt file
In Microsoft 365, our License units can have three states: Enabled - all is well; user access is unrestricted Warning - user access is unrestricted, however, the subscription is expired -- this lasts for a thirty-day grace period Suspended - Once the grace period is over, the user is not able to access any Microsoft 365 content - admins cannot assign licenses, but can access data - this can be reactivated by the global admin -- this lasts for another ninety days Following this, the entitlement is deleted; this is no longer able to be restored or reactivated, and data begins to be deleted
Essentially, the only status where we are consuming from purchased, active entitlements is Enabled status. When we're in warning status, our entitlement is already expired and is not therefore counted as a Purchased Entitlement in our License Summary. Confirm against our Powershell output for the relevant License(s) here; the total of the Enabled, Suspended and Warning status Entitlements should add up to our Microsoft 365 Portal value.
If we have 0 enabled entitlements, due to all our entitlements being in suspended or warning status, that would explain our returned value of 0 in FNMS.