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 Pages / PowerApps PowerShell
Power Pages
Unanswered

PowerApps PowerShell

(0) ShareShare
ReportReport
Posted on by 1

Hello, 

 

I have a request to create a PowerShell script to do the following:

 

1- Create a new environment with and without Database.

2- Grant access to the Environment that has Database via security group.

 

The creation part is done, my question is if there any PowerShell command available to associate the security group with the environment access?. 

Or if there is any other PowerShell script I can use to grant access to Environment that has Database?. 


Thanks. 

Categories:
I have the same question (0)
  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @MohElayyan93 

     

    Try the following PowerShell command

    Set-AdminPowerAppEnvironmentRoleAssignment
     -EnvironmentName <String>
     -RoleName <String>
     -PrincipalType <String>
     -PrincipalObjectId <String>
     [-ApiVersion <String>]
     [<CommonParameters>]

     

    more useful cmdlets here 

    https://docs.microsoft.com/en-us/powershell/module/microsoft.powerapps.administration.powershell/set-adminpowerappenvironmentroleassignment?view=pa-ps-latest 

     


    Hope it helps. 
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

     

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 Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard