Home

Get email alerts for low than 50 free Office 365 licenses

%3CLINGO-SUB%20id%3D%22lingo-sub-780998%22%20slang%3D%22en-US%22%3EGet%20email%20alerts%20for%20low%20than%2050%20free%20Office%20365%20licenses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-780998%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3EIn%20my%20environment%20we%20have%20for%20the%20moment%20to%20SG%20who%20are%20entitled%20for%200ffice%20365%20licence.%20Is%20a%20dynamic%20environment%20and%20a%20few%20times%20we%20have%20been%20very%20closed%20to%20rich%20our%20total%20limit.%3C%2FP%3E%3CP%3EI%E2%80%99m%20locking%20for%20a%20option%20to%20send%20some%20alerts%20when%20the%20available%20licence%20number%20drops%20under%20a%20specific%20number%3C%2FP%3E%3CP%3EI%E2%80%99ve%20found%20a%20few%20tutorials%20but%20I%20couldn%E2%80%99t%20used%20them%2C%20not%20complete%20solutions.%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FOffice-365%2FOffice-365-license-consumption-alert%2Ftd-p%2F56036%26nbsp%3B%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FOffice-365%2FOffice-365-license-consumption-alert%2Ftd-p%2F56036%26nbsp%3B%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgcits.com%2Fknowledge-base%2Fget-email-alerts-unused-office-365-licenses-azure-functions-azure-storage-microsoft-flow%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgcits.com%2Fknowledge-base%2Fget-email-alerts-unused-office-365-licenses-azure-functions-azure-storage-microsoft-flow%2F%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-780998%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%20center%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-782048%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20email%20alerts%20for%20low%20than%2050%20free%20Office%20365%20licenses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-782048%22%20slang%3D%22en-US%22%3E%3CP%3EIt's%20easy%20to%20do%20with%20PowerShell%2C%20what%20exactly%20is%20not%20working%20for%20you%20in%20the%20proposed%20solutions%3F%20You%20need%20one%20call%20of%26nbsp%3B%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EGet-MsolAccountSku%2C%20a%20simple%20if%20statement%20and%20then%20an%20email%20action.%20There's%20no%20need%20for%20azure%20functions%20or%20Flows%20or%20anything.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-783484%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20email%20alerts%20for%20low%20than%2050%20free%20Office%20365%20licenses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783484%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3EHi%20Vasil%2C%20indeed%20the%20first%20part%20is%20true%26nbsp%3BGet-MsolAccountSku%20work%20fine%20but%20the%20second%20part%20is%20not%20easy%20to%20achieve%20and%20I%20couldn't%20make%20the%20script%20to%20work%2C%20check%20if%20number%20is%20smaller%20than%20x%20and%20then%20send%20a%20email.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-783525%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20email%20alerts%20for%20low%20than%2050%20free%20Office%20365%20licenses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783525%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F243173%22%20target%3D%22_blank%22%3E%40Cristian%20Ceobanu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20simply%20use%20below%20logic%20-%20Get%20the%20number%20of%20consumed%20units%20and%20based%20on%20the%20consumption%20call%20email%20alert.%20You%20can%20extend%20below%20logic%20for%20your%20script%20by%20adding%20some%20error%20handling%20and%20email%20function.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EChange%20the%20tenant%20name%20and%20sku%20type%20-%20you%20want%20to%20monitor%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24GetConsumedUnits%3D(Get-MsolAccountSku%20%7C%20where%20%7B%24_.AccountSkuId%20-eq%20%22tenant%3AENTERPRISEPACK%22%7D)%20%7C%20Select-Object%20ConsumedUnits%3CBR%20%2F%3EIf%20(%24GetConsumedUnits.ConsumedUnits%20-gt%20xx)%3CBR%20%2F%3E%7B%3CBR%20%2F%3ECall%20Email%26nbsp%3B%20Alert%20Function%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3EH%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-783564%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20email%20alerts%20for%20low%20than%2050%20free%20Office%20365%20licenses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783564%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F136494%22%20target%3D%22_blank%22%3E%40Hemat%20Maheshwari%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20Hemat%2C%20i%20will%20start%20to%20do%20some%20test%20right%20now%20%3A).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1262937%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20email%20alerts%20for%20low%20than%2050%20free%20Office%20365%20licenses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1262937%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F243173%22%20target%3D%22_blank%22%3E%40Cristian%20Ceobanu%3C%2FA%3E%2C%26nbsp%3Bthis%20is%20probably%20what%20you%20are%20looking%20for.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Finsterswap.wordpress.com%2F2020%2F03%2F29%2Fautomatically-alert-your-team-when-your-tenant-is-running-low-or-out-of-office-365-license%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Finsterswap.wordpress.com%2F2020%2F03%2F29%2Fautomatically-alert-your-team-when-your-tenant-is-running-low-or-out-of-office-365-license%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EDepending%20on%20how%20big%20or%20complicated%20your%20environment%20is%2C%20the%20script%20may%20require%20a%20little%20modification.%20Our%20need%20was%20just%20as%20simple%20as%20%E2%80%9Ctell%20us%20when%20our%20license%20is%20low%20or%20out%E2%80%9D.%20As%20the%20saying%20goes%2C%20necessity%20is%20the%20mother%20of%20invention.%20Feel%20free%20to%20modify%20the%20script.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi all,

In my environment we have for the moment to SG who are entitled for 0ffice 365 licence. Is a dynamic environment and a few times we have been very closed to rich our total limit.

I’m locking for a option to send some alerts when the available licence number drops under a specific number

I’ve found a few tutorials but I couldn’t used them, not complete solutions.

https://techcommunity.microsoft.com/t5/Office-365/Office-365-license-consumption-alert/td-p/56036 

https://gcits.com/knowledge-base/get-email-alerts-unused-office-365-licenses-azure-functions-azure-s...

5 Replies
Highlighted

It's easy to do with PowerShell, what exactly is not working for you in the proposed solutions? You need one call of Get-MsolAccountSku, a simple if statement and then an email action. There's no need for azure functions or Flows or anything.

Highlighted

@Vasil MichevHi Vasil, indeed the first part is true Get-MsolAccountSku work fine but the second part is not easy to achieve and I couldn't make the script to work, check if number is smaller than x and then send a email.

Highlighted

@Cristian Ceobanu 

 

You can simply use below logic - Get the number of consumed units and based on the consumption call email alert. You can extend below logic for your script by adding some error handling and email function. 

 

Change the tenant name and sku type - you want to monitor 

 

$GetConsumedUnits=(Get-MsolAccountSku | where {$_.AccountSkuId -eq "tenant:ENTERPRISEPACK"}) | Select-Object ConsumedUnits
If ($GetConsumedUnits.ConsumedUnits -gt xx)
{
Call Email  Alert Function
}

 

Cheers,

H,

Highlighted

@Hemat Maheshwari 

Thanks Hemat, i will start to do some test right now :).

Highlighted

@Cristian Ceobanu, this is probably what you are looking for. https://insterswap.wordpress.com/2020/03/29/automatically-alert-your-team-when-your-tenant-is-runnin...

Depending on how big or complicated your environment is, the script may require a little modification. Our need was just as simple as “tell us when our license is low or out”. As the saying goes, necessity is the mother of invention. Feel free to modify the script.