Below is some example PowerShell which integrates with OMS (Operations Management Suite). It has some examples on how you can pull out OMS saved searches and run saved searches.
It also has some examples of gathering some information from the Security & Audit solution working with some particular security domains.
To be able to use PowerShell against OMS successfully, you can’t logon to PowerShell using a Microsoft account. You need to use an organisational based account. This same account would need to have the necessary permissions against OMS.
I recommend you install this Azure PowerShell module https://github.com/Azure/azure-powershell/releases/tag/v3.0.0-September2016 as this contains the cmdlets you need to work with OMS. If you install this, skip the first few lines of the script.