List current subscriptions Flow
Earlier I created a Flow to start a subscription for SharePoint on the Office 365 Management Activity API. Today I will share my Flow which lists all the current subscriptions.
Why would you need something like that
Honestly I was a bit tired of running the same requests with Postman over and over again. So I decided it was time to just configure a Flow for this. The purpose of this Flow is to list your current started subscriptions for the Office 365 Management Activity API.
Which actions are you using?
First of all the Flow is using a manual trigger so you can run it whenever you want. It’s also using three initialize variables actions.
The main action is the HTTP request. It is using a Get Method against the Office 365 Management Activity API. It’s listing the subscriptions from your specified tenantid.
For the Active Directory OAuth part I am actually using three initialize variable actions.
Of course there are alternative ways of doing this. Microsoft has a nice Troubleshooting the Office 365 Management Activity API article which has a codesnippet for listing subscriptions with Windows PowerShell.
It is actually an Invoke-WebRequest cmdlet which they are using. Below is the same codesnippet.