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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 361

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard