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

Community site session details

Session Id : FdMVjY6YuoTsAP6Esqfk9s
Power Automate - Building Flows
Unanswered

Trying to check the queue to deallocate VMs to reduce cost

Like (1) ShareShare
ReportReport
Posted on 14 Jul 2024 12:01:37 by 119

Hi everyone,

I hope you're all doing well. I'm currently developing a flow in Power Automate to manage virtual machines (VMs) in a machine group based on the presence of items in a queue. The intended functionality of the flow is as follows:

  1. Check Queue: Verify if there are any items in the queue of a machine group.
  2. Power Management:
    • If there are no items in the queue: Turn off all VMs in the machine group.
    • If there are items in the queue: Turn on the VMs in the machine group.

During the development of this flow, I'm encountering an "Authentication failed" error when trying to authenticate and retrieve data from the Power Automate API. Here’s a brief outline of the steps and configurations I have implemented:

  1. Azure Automation: Created a runbook to generate an authentication token using client credentials (tenant ID, client ID, and client secret). The runbook successfully generates a token.
  2. Power Automate Flow: Use the generated token to make an HTTP GET request to the Power Automate API to check the queue status. I encounter the "Authentication failed" error during this HTTP request.

I have ensured that the client credentials are correct and have sufficient permissions. 

Maybe there is another way to do this on a easier way, I just wanted to reduce costs of my VMs that sometimes, just stay "idle" for a while.

 

Could anyone help me resolve this issue? Any guidance or suggestions to troubleshoot this authentication error would be greatly appreciated.

Thanks for your support!

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

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!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete