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 / Trying to check the qu...
Power Automate
Unanswered

Trying to check the queue to deallocate VMs to reduce cost

(1) ShareShare
ReportReport
Posted on by 123

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!

Categories:
I have the same question (0)

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard