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 / Trigger cloud flow fro...
Power Automate
Suggested Answer

Trigger cloud flow from desktop flow authentication issue

(1) ShareShare
ReportReport
Posted on by 15
Good afternoon,
 
I'm currently using a desktop flow which processes invoices. We have to extract some text from the PDF. This works quite fine for most suppliers, but some have some weird template or use way too much text to have a clear description in our system. So I'd like to summarize the extracted PDF text. I've tried to do this within power automate desktop but this was not succesfull so far. 
 
I've moved on to trigger a cloud flow where I use the action run a prompt to summarize the text. This is working, but only when I select 'Anyone' as the 'Who can trigger the flow?'. I don't think this is quite safe enough, but when I change it to Any user in my tenant or a specific user I get an error: 
 
{"error":{"code":"DirectApiAuthorizationRequired","message":"The OAuth authorization scheme is required. Please add authentication scheme and try again.","messageTemplate":"DirectApiAuthorizationRequired"}}
 
I've done some research but these solutions seem quite extraordinary (and from years ago). Is there a easier way to fix this? Or is there even a better way to summarize extracted text by AI?
 
Thanks in advance!
 
Youri
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,188 on at
    Hi @YM-26051441-0,
     
    Let's analyze the root cause why "Anyone" works but restricted options fail:
     
    When you set "Who can trigger the flow?" to Anyone, the flow is exposed as an anonymous HTTP endpoint, so no authentication is required. But when you restrict it to Any user in your tenant or Specific users, the flow expects an OAuth token to authenticate the caller. Your desktop flow or client calling the cloud flow must provide this OAuth token in the request header, which is not happening currently, causing the error.
     

    What we can to fix this securely:

    Approach-1: Use an authenticated connection from Power Automate Desktop

    When PAD triggers the cloud flow, it must authenticate using OAuth. This typically means using a Power Automate connector or HTTP with Azure AD authentication in your cloud flow trigger. PAD can call the cloud flow via the Power Automate connector or use an HTTP action with a valid bearer token.

    Approach-2: Use a Power Automate button or a service principal

    Trigger the cloud flow via a Power Automate button or a service principal that has permission to run the flow. This ensures the OAuth token is included.

    Approach-3: Configure Azure AD app registration for authentication

    Register an app in Azure AD to get client ID and secret. Use these credentials in PAD to acquire an OAuth token and call the cloud flow HTTP trigger with authentication.

    Approach-4:Use Power Automate Desktop’s built-in cloud flow trigger

    Instead of calling the cloud flow via HTTP, use PAD’s Run a cloud flow action, which handles authentication automatically.
     
     
    Summarize extracted PDF text

     Since Power Automate Desktop (PAD) itself doesn’t have built-in text summarization capabilities, what we may try

    Use AI or Cloud Services for Summarization: Send the extracted text from PAD to an external AI service or API that supports text summarization (e.g., Azure OpenAI, GPT-based APIs, or other NLP services). You can call these APIs via HTTP requests from PAD or by integrating with Power Automate cloud flows that support AI Builder or Azure Cognitive Services. The summarized text can then be returned to PAD for further processing.

    Use Power Automate Cloud Flow with AI Builder or Azure Cognitive Services: Create a cloud flow triggered by PAD that sends the extracted text to AI Builder’s Text Analytics or Azure Cognitive Services Text Summarization API. Return the summarized result back to PAD or store it for your workflow.

    Basic Text Processing in PAD - The alst resort: If external AI is not an option, you can try simple heuristics in PAD like extracting the first few sentences, removing stop words, or truncating text to a certain length.

     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard