cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sanjeev40084
Regular Visitor

Setup Power Platform Security Group from CLI

Is there a way to setup power platform environment with the database's security group from CLI? I didn't see any command on pac cli nor in powershell side. 

 

Thanks,

Sanjeev

5 REPLIES 5
Ionaaa
Helper II
Helper II

Yes you can 😁

https://docs.microsoft.com/en-us/powershell/module/microsoft.powerapps.administration.powershell/new...

The Powerapps administration powershell module has the following command:

 

New-AdminPowerAppEnvironment

 

Which takes as inputs:

 

   [-DisplayName <String>]
   -LocationName <String>
   -EnvironmentSku <String>
   [-ProvisionDatabase]
   [-CurrencyName <String>]
   [-LanguageName <String>]
   [-Templates <String[]>]
   [-SecurityGroupId <String>]
   [-DomainName <String>]
   [-WaitUntilFinished <Boolean>]
   [-ApiVersion <String>]
   [<CommonParameters>]

 so you can actually pas the Azure security group ID!

sanjeev40084
Regular Visitor

Thank you. It seems like you can only do that while creating new instance. Do you know if that can be done while resetting the instance too?

Ionaaa
Helper II
Helper II

Not sure if you can actually reset and assign a security group in one call, but you have options in that module to add security groups. It is also possible to do via REST api, so there are some options, might require combining some actions.

sanjeev40084
Regular Visitor

can you provide me rest api info?

Ionaaa
Helper II
Helper II

I don't have the documentation at hand right now, but you could reverse engineer the Power Automate action 😉

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Users online (4,285)