Forum Discussion
Help Needed: Exporting Azure Sign-In Logs Without Incurring Costs
Hi everyone,
I’m a complete novice when it comes to Azure and PowerShell, and I need some help with exporting sign-in logs from Azure. Recently, I attempted to use PowerShell to fetch these logs but encountered an error that I don’t fully understand. Here’s the error message I received:
Import-Module : Function Get-MgEntitlementManagementAssignmentPolicy cannot be created because function capacity 4096 has been exceeded for this scope.
From my understanding, this error is related to a limitation in PowerShell regarding the number of functions that can be loaded in a session. My main concern is whether this or my attempts to fetch sign-in logs could result in unexpected charges on my Azure account.
Here are the specific questions I have:
- Does using PowerShell to fetch Azure sign-in logs incur any costs?
- Is the error message I encountered indicative of any charges, or is it solely a PowerShell limitation?
- What is the best way to fetch sign-in logs without exceeding PowerShell’s function capacity and without incurring additional costs?
I would appreciate any advice or guidance on how to proceed safely. I'm eager to learn but want to ensure I don’t inadvertently rack up costs.
Thank you in advance for your help!
Worth to reference on below page:
https://infrasos.com/get-azureadauditsigninlogs-find-sign-in-logs-for-last-30-days-with-powershell/
- KavyadharshniCopper Contributor
Sinclair_ZX81
Increase the $MaximumFunctionCount, and proceed to load the Graph Modules. You can set up to 32,768. For example,$MaximumFunctionCount 8000