web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Execute Excel Script -...
Power Automate
Unanswered

Execute Excel Script - Unauthorized

(1) ShareShare
ReportReport
Posted on by 47

Hello,

In order to accomplish a couple of things I cannot do directly in Power Automate, I started executing regular expressions using the "Run Excel Script" activity. It had been working fine, but on Monday it started to fail. This execution of the Excel script is inside of an "Apply to each" activity.

What I've done so far to try to fix it:

1. Removed default concurrency to the trigger, so I make sure this process is not executing multiple times in parallel.

2. Removed default concurrency of the "Apply to each" activity, to make sure the process is not trying to execute the script multiple times at the same time.

3. On the Run Excel Script, I've played with the Retry Policy, with no luck.

The issue persists.

The weirdest thing is that this issue might or might not happen on the same execution and within the apply to each.

The Error:

gersontun_0-1632951157850.png

 

In the apply to each activity:

Execution number 5 failed, number 6 succeeded and number 8 failed again.. and so on.

Failed:

gersontun_1-1632951247286.png

Succeeded:

gersontun_2-1632951283538.png

Failed:

gersontun_3-1632951323916.png

 

This is the configuration of the RunScriptPageNumber:

gersontun_4-1632951777533.png

Hope anyone here can help!

 

UPDATE: Now that I am editing the flow, the issue started appearing on the top like this:

gersontun_1-1632952564540.png

 

It seems like the file was not available or I didn't have permissions on the file.

The excel file is saved and closed, no one else is using it.

 

Categories:
  • Yutao Huang Profile Picture
    Microsoft Employee on at

    Hi @gersontun ,

     

    Sorry to hear you're experiencing this problem. It might be an issue on our side and we have been actively investigating the root cause. Will let you know once it's been addressed. Thanks for your patience!

     

    Yutao

  • BP-18031953-0 Profile Picture
    on at

    Currently having the exact same issue. Yesterday (EST 9/29) I was completely unable to get an Office Script to run from a flow, but this morning it has executed twice successfully - but just now did not work. I double checked with our global admin, and it is enabled for use.

     

    Today:

    younceb_1-1633004846455.pngyounceb_2-1633004946935.png

     

     

     

     

    Yesterday issue, apologies didn't get a good screenshot. But it was the same error as OP.

     

    younceb_3-1633005226862.png

     

    The suggested community posts for the failure were very helpful to find this thread

  • Yutao Huang Profile Picture
    Microsoft Employee on at

    Hello @younceb and @gersontun -

     

    The issue should be addressed now. Can you please give it a try and see if your flows are working now? Thanks again for the patience!

     

    Yutao

     

     

  • gersontun Profile Picture
    47 on at

    It's seems to be working now.

  • ExcelOffTheGrid Profile Picture
    5 on at

    Yes, appears to be working again.  Thanks for fixing 🙂

  • BP-18031953-0 Profile Picture
    on at

    It is indeed working well now! Thanks so much

  • Snoemannen Profile Picture
    32 on at

    I have just now started getting the same problem.

    I had an office script in a flow to do a regex-search on a string and it had been working for a while but now it has suddenly started giving an error "Unauthorized" and the Error details 
    {"debugInfo":"clientRequestId: bf1fc99f-a3e4-4b73-993c-26514105edb5"}

    I made a new identical script and changed to use that instead and it worked twice and then stopped working again with the same error.

    What was the problem and can it be fixed again?

  • sansellvf Profile Picture
    4 on at

    Is this an issue again? I have a production process using the 'Run Script' action in Power Automate and this is currently failing due to an 'Unauthorized' error message. How can I escalate this to Microsoft?

  • MarcellSzeles Profile Picture
    10 on at

    Same issue happening again.

  • Yutao Huang Profile Picture
    Microsoft Employee on at

    @Snoemannen , @sansellvf , @MarcellSzeles - the outage was resolved around 9 AM Pacific Time (5 PM West European Time). Please let us know if you are still experiencing these failures.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard