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 Apps / Not able to get the ac...
Power Apps
Answered

Not able to get the access token for the non-default environment in power platform

(0) ShareShare
ReportReport
Posted on by 2

Scenario: I have a scenario where in I need to get all the solutions in an environment using Power Automate. For this we are using the API "https://login.microsoftonline.com/<Environment ID>/oauth2/token" using the app registration client ID and client Secret. I have also given this app user access in the same environment with role of "System Customizer".

 

Issue: I am getting the error with error code 90002. Where if I hit the same API with the default environment ID, I am able to get the access token.

 

Can anyone suggest what I am doing wrong here ?

I have the same question (0)
  • Verified answer
    velegandla Profile Picture
    204 Moderator on at

    @SumitKanchandk8 

     

    URI should be TenantID not the environmentID

     

    https://login.microsoftonline.com/yourtenantid/oauth2/token

     

    Check the blog post here

    Getting a Bearer Token in Power Automate Flow from Azure App Registration | Medium

     

    ====================================================

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    https://www.linkedin.com/in/devendravelegandla/ 

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard