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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApp that adds use...
Power Apps
Unanswered

PowerApp that adds users to an environment, but need to get each security role

(0) ShareShare
ReportReport
Posted on by 85

I am fed up with using the Power Platform admin center to add new users to environments and assigning roles.   It takes forever considering all the users and apps we have.  It is constant management.

 

So, I am building a PowerApp where my team and I can do add and remove user of that from a nice one stop visual place.   I can collect all Environments but how can I call all roles per environment?  So I can select them and run a powershell to add/remove them?  

 

Or is there a better way to do it?   This is frustrating to me.

 

 

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    Yes, there is a much better way. The Power Apps CLI has a command "pac admin assign-user" which lets you assign the user and grant roles in one step. Far faster, far easier, and no need to build your own app for it.

     

    Microsoft Power Platform CLI admin command group - Power Platform | Microsoft Learn

  • phillippoole Profile Picture
    85 on at

    Yes, I guess my objective wasn't 100% clear.  

    I am going to use the CLI by PowerAutomate (via PowerApps) after everything is selected in the PowerApp.   

     

    But in order to pass those variables, I need to pull the Security Roles from each Environment specifically so I can assign them to variables to pass into the PowerAutomate and CLI.   I just want to recall a list of them so when using the app, they can be selected and assigned to those variables.

     

    Does that give clarity?

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 248 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 209 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard