cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

How to assign security role to an user, using powershell?

Hi,

 

I am looking to create Power Apps environment, CDS and assign security role to an user.

 

I am able to achieve creating environment and cds using the below commands.

New-AdminPowerAppEnvironment -->> to create an environment

New-AdminPowerAppCdsDatabase -->> to create CDS for the environment

 

Query: how to assign a security role to the user in the environment?  I happen to see a command Set-AdminPowerAppEnvironmentRoleAssignment; but unsure if this is even right or how to use it. Any help is much appreciated

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to assign security role to an user, using powershell?

Hi @Ravitheja ,

Do you want to assign Security Role of a Environment to a specific user using PowerApps PowerShell cmdlet?

Do you set up a Common Data Service database within your Environment?

 

Currently, the Set-AdminPowerAppEnvironmentRoleAssignment command could only work today for environments that do not have a Common Data Service databaseIf you have set up a Common Data Service database within your Environment, the Set-AdminPowerAppEnvironmentRoleAssignment command would not work for your needs.

4.JPG

If you would like this feature to be added in your PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

If you have set up a Common Data Service database within your Environment, you could only go to your Power Platform Admin Center, then find your created Environment instance, then click "Settings" option, expand "Users + permissions"-> click Users option:

 

5.JPG

Within the opening Users panel, find the specific user you want to assign security role, then click "MANAGE ROLES" button, then you could assign Security Roles there:

6.JPG

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: How to assign security role to an user, using powershell?

Hi @Ravitheja ,

Do you want to assign Security Role of a Environment to a specific user using PowerApps PowerShell cmdlet?

Do you set up a Common Data Service database within your Environment?

 

Currently, the Set-AdminPowerAppEnvironmentRoleAssignment command could only work today for environments that do not have a Common Data Service databaseIf you have set up a Common Data Service database within your Environment, the Set-AdminPowerAppEnvironmentRoleAssignment command would not work for your needs.

4.JPG

If you would like this feature to be added in your PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

If you have set up a Common Data Service database within your Environment, you could only go to your Power Platform Admin Center, then find your created Environment instance, then click "Settings" option, expand "Users + permissions"-> click Users option:

 

5.JPG

Within the opening Users panel, find the specific user you want to assign security role, then click "MANAGE ROLES" button, then you could assign Security Roles there:

6.JPG

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Users online (8,471)