Skip to main content

Notifications

Community site session details
Power Apps - Building Power Apps
Answered

Get PowerApps Error Logs

Like (0) ShareShare
ReportReport
Posted on 16 Jan 2023 06:20:18 by 8

Is there any way to get PowerApps error logs via API or something else? I would like to get the error logs of the PowerApps.

  • Verified answer
    Ramole Profile Picture
    Super User 2024 Season 1 on 17 Jan 2023 at 07:21:44
    Re: Get PowerApps Error Logs

    @Kamlesh780 
    If you need an example 
    Add this AppOnStart

    Set(
     gblAppGlobalName,
     {
     ApplicationName: "My Project Software",
     ApplicationID: "17718e8c-f2e0-40e1-8be0-f1ab03e73ef7",
     SessionID: Text(
     Now(),
     "ddmmyy-hhmmss"
     )
     }
    );
    

    Reuse gblAppGlobalName example to get app name  gblAppGlobalName.ApplicationName

    testglobal.PNG

    Backend 
    SharePoint
    BackEnd.PNG

     ErrorCapture.PNG
    Patch

    Set(
     gblError,
     Patch(
     'Error Log',
     Defaults('Error Log'),
     {
     
    ControlName: "Test",
     User: $"{gblCurrentUser.Title}. at{Now()}.",
     ApplicationName:gblAppGlobalName.ApplicationName,
     ApplicationID:gblAppGlobalName.ApplicationID,
     SessionString:gblAppGlobalName.SessionID
     }
     )
    );
    If(
     IsBlankOrError(gblError),
     Error(
     {
     Message: "Patch failed",
     Kind: ErrorKind.GeneratedValue,
     Source: "Button25"
     }
     )
    )

     

  • Ramole Profile Picture
    Super User 2024 Season 1 on 17 Jan 2023 at 06:44:02
    Re: Get PowerApps Error Logs

    @Kamlesh780 

    Easier way to do it is hard coded on OnAppStart and added when patching to list you created for the error to capture so it will also added if any error occurs 

  • Kamlesh780 Profile Picture
    8 on 17 Jan 2023 at 06:33:02
    Re: Get PowerApps Error Logs

    Hi @Ramole ,

    Thank you for your response 😊 

    This is the good one, but I have a few existing PowerApps and want to get error logs for all existing apps without updating them. I would like to get error logs by providing a PowerApp ID.

  • Kamlesh780 Profile Picture
    8 on 16 Jan 2023 at 12:32:08
    Re: Get PowerApps Error Logs

    Hi @v-xiaochen-msft ,

    Thank you for your response.

    But I cannot use upcoming features (preview, experimental, or retired) in my project.

  • v-xiaochen-msft Profile Picture
    on 16 Jan 2023 at 07:48:57
    Re: Get PowerApps Error Logs

    Hi @Kamlesh780 ,

     

    At my knowledge, we can use Application Insights to get powerapps error logs.

    https://sharepains.com/2022/08/09/power-apps-azure-application-insight/

     

    Best Regards,

    Wearsky

  • Ramole Profile Picture
    Super User 2024 Season 1 on 16 Jan 2023 at 06:57:13
    Re: Get PowerApps Error Logs

    Hi @Kamlesh780 
    Am not aware if there is a API for that but here is an example explained by Shane Young which you can create a SharePoint list to handle and capture all errors on your app 
    Power Apps OnError to capture, suppress, and report all errors 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,776 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard
Loading started
Loading started