Forum Discussion

DBAAbhi2021's avatar
DBAAbhi2021
Copper Contributor
Dec 22, 2021

Need help with Unattended Search-UnifiedAuditLog

We have a requirement to pull Audit Logs on daily basis through a job unattended.

 

We have installed ExO and configured a Service Principal and given the API permission(Exchange.ManageAsApp).

We added the Service Prinipal to "Security Administrators" role in Azure.

But still we are not able to execute "Search-UnifiedAuditLog" from powershell when we interactively login to Powershell using cerfiticate based authentication. The module ExchangeOnlineManagement loads but it does not recognized the Search-UnifiedAuditLog. 

 

Resources