Set-AdminPowerAppRoleAssignment

Sets permissions to an app.

Syntax

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

Description

The cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet parameter sets.

The Set-AdminPowerAppRoleAssignment cmdlet sets permission to an app.

Examples

EXAMPLE 1

Set-AdminPowerAppRoleAssignment -PrincipalType Group -PrincipalObjectId [Guid] -RoleName CanEdit -AppName [Guid] -EnvironmentName Default-[Guid]

Gives the specified security group CanEdit permissions to the specified app in the specified default environment.

Parameters

-ApiVersion

Version of Power Apps API to use.

Type:String
Position:Named
Default value:2016-11-01
Accept pipeline input:False
Accept wildcard characters:False

-AppName

ID of the app to update.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-EnvironmentName

ID of the environment of the app.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-PrincipalObjectId

Object ID of the user or security group principal to share the app. You can use the Get-UsersOrGroupsFromGraph cmdlet to look up the object ID for a user or group in Azure Active Directory.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-PrincipalType

Type of principal that the app is being shared with: a user, a security group, or the entire tenant. Valid options are User, Group, Tenant.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-RoleName

Permission level given to the app. Valid options are CanView, CanViewWithShare, CanEdit. Sharing with the entire tenant is supported only for CanView.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False