In at this time’s digital panorama, managing person accounts and monitoring their actions is essential for organizations to make sure safety and keep an environment friendly workflow.
With the rising adoption of cloud providers like Azure Lively Listing (Azure AD), organizations want a dependable option to monitor person login actions.
Thankfully, PowerShell, a strong scripting language, mixed with graph API, affords an efficient resolution to generate complete studies on person login data.
On this weblog put up, I’ll share the PowerShell Magic utilizing graph API to generate Azure AD Consumer Final Login Report.
Stipulations for this resolution:
Obtain the answer from beneath git hub hyperlink: (AzureADLastLoginReport.ps1)
https://github.com/VikasSukhija/Downloads
Obtain the answer from PowerShell Gallery:
https://www.powershellgallery.com/packages/AzureADLastLoginReport
Set up-Script -Title AzureADLastLoginReport
Notice: It is advisable to setup AzureAD app registration with Consumer.Learn.All and AuditLog.Learn.All permissions.
Please replace the beneath part of the script as pe your surroundings:
You may run the script as .AzureADLastLoginReport.ps1 –
DaysSinceLastLogin 90 -UserType visitor -smtpserver smtpserver -from donotrespond@labtest.com -erroremail vikas.s@labtest.com -logrecyclelimit 60
Consumer kind could be any of the three choices à visitor, member or All in case you need report on each.
You may schedule the script in case you need and have the report despatched to you on daily basis or each week as per your necessities.
I’ve run it on greater than 50k person Tenant and it simply finishes in lower than 10 minutes.
Beneath might be out put format of the script: (one report might be full report and different is predicated on variety of days you have got added)
Each studies might be saved in report folder.
I hope you’ll like this script pattern and can be capable to put it to use.
Thanks for studying and downloading…
Tech Wizard