Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Governance and Administ...
Answered

Audit run data for a Flow

(0) ShareShare
ReportReport
Posted on by 28

I can see run data in the run history of Flows in the admin centre. How can I get to that data programmatically?

Given we cannot easily restrict which instances of services that a Flow connects to with a connector, I wish to monitor where Flows transfer data to. The Office 365 audit log only captures changes to Flows, not the actual running instance data.

 

 

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: Audit run data for a Flow

    Apologies for late reply. What do you mean "it is not the 1st line API permission Dynamics CRM"?
    Also by enable/disable flows, possible to ellaborate on what you trying to do. Probably be best in another post as this one was for getting audit data programmatically. Cheers 🙂

  • slx Profile Picture
    108 on at
    Re: Audit run data for a Flow

    thank you, it is not the 1st line API permission Dynamics CRM?

     

    trying to enable/disable flows is there any other permission that env maker ?

     

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: Audit run data for a Flow

    Is you 2nd screenshot, you've haven't provided access to Dynamics CRM. 

  • slx Profile Picture
    108 on at
    Re: Audit run data for a Flow

    Yes

     

    registered in here as env maker, system admin etc

    slx299_0-1642802395780.png

     

    and azure

    using client id + secret

     

    slx299_1-1642802469642.png

     

     

    slx299_2-1642802519876.png

     

    run command as


    Add-PowerAppsAccount -TenantID 53da8350-xxx -ClientSecret 14G7Q~xxx -ApplicationId c56bc62a-XXX

     

     

     

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: Audit run data for a Flow

    Did you grant D365 privileges to the service principal/app registration? Here are the steps: https://docs.microsoft.com/powerapps/developer/data-platform/walkthrough-register-app-azure-active-directory 

  • slx Profile Picture
    108 on at
    Re: Audit run data for a Flow

    same error

     

    CommonDataServiceDatabaseProvisioningState :
    CommonDataServiceDatabaseType : None
    Internal : @{StatusCode=403; StatusDescription=Forbidden; Headers=Pragma: no-cache
    Strict-Transport-Security: max-age=31536000; includeSubDomains
    x-ms-request-id: xxxxxx
    x-ms-correlation-request-id: 739ca3dc-be16-4bb5-a821-2d9fc35976b9
    Connection: close
    Content-Length: 406
    Cache-Control: no-cache, no-store
    Content-Type: application/json; charset=utf-8
    Date: Fri, 21 Jan 2022 19:28:40 GMT
    Expires: -1

    ; Error=; Message=The service principal with id 'xxx' for application
    c56bc62a-40db-4900-c does not have permission to access the path 'https://api.bap.microsoft.com/provide
    rs/Microsoft.BusinessAppPlatform/scopes/admin/environments/~default?$expand=permissions&api-version=2016-11-01' in
    tenant 53da83ccccccccccc.; Internal=System.Net.HttpWebResponse}

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: Audit run data for a Flow

    Try without the EndPoint param

  • slx Profile Picture
    108 on at
    Re: Audit run data for a Flow

    Hi

     

    I get the same issue did you get any fix ?


    Add-PowerAppsAccount

    -Endpoint "tip1"

    -TenantID YYY

    -ClientSecret XXX

    -ApplicationId ZZZZ

     


    Code : 403
    Description : Forbidden
    Headers : {Pragma, Strict-Transport-Security, x-ms-request-id, x-ms-correlation-request-id...}
    Error : @{code=Forbidden; message=The service principal with id 'XXX' for
    application YYY does not have permission to access the path 'https://tip
    2.api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/exportServicePlans?api-versi
    on=2016-11-01' in tenant XXX.}
    Errors :

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: Audit run data for a Flow

    Strange then... it’s hard to investigate further without having access but I would submit an Microsoft Support Ticket at: https://admin.powerplatform.microsoft.com

  • PlanetWilson Profile Picture
    28 on at
    Re: Audit run data for a Flow

    Yes I did, it's in the form "Default-<guid>" and I do get run history data for some Flows - the ones where I am also an owner.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Featured topics