A cloud-based identity and access management service for securing user authentication and resource access
You can use PowerShell if you don't want to use Logic Apps. I'm assuming that you still want to use Log Analytics.
You will need to code this yourself though so you'll need PowerShell knowledge. It's doubtful anyone will just write you a script.
Need to learn PowerShell?
The following download is free.
Windows-PowerShell-4
Start with the first half of the book and do the exercises to cover the basics.
Then work through the 2nd half of the book which covers common tasks.