I am trying to write something which collates all the Flow run history for SIEM purposes...
I am really struggling to get this working properly though. I can connect with a user account who is admin and get a list of Flows but to get the detailed run history I can only do that if I am a Flow owner and I don't want to start editing Flow ownerships.
If I instead create an appreg and service princpial and give it all the Flow permissions and use that, I can connect but it shows no Flows when I make the powerShell call and looking in Fiddler I can see I get errors back from the call it makes:-
{"error":{"code":"Forbidden","message":"The service principal with id '05a648a9-a973-4a7c-bd5b-bdcc3c4f3333' for application d28391d3-6efc-4394-a617-35b0176f3333 does not have permission to access the path 'https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments?$exp...' in tenant 1852a578-cc98-460b-89dc-8af158ad3333."}}
and no matter which permission I attempt to give to the app I always get this...
Does anyone have any ideas? because the only way to resolve this would be to alter the permission of each and every Flow to get the run history

Report
All responses (
Answers (