Dela via


Set-AdminPowerAppRoleAssignment

Sets permissions to the app.

Syntax

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

Description

The Set-AdminPowerAppRoleAssignment cmdlet sets up permission to an app depending on the parameters. Use Get-Help Set-AdminPowerAppRoleAssignment -Examples for more detail.

Examples

EXAMPLE 1

Set-AdminPowerAppRoleAssignment -PrincipalType Group -PrincipalObjectId b049bf12-d56d-4b50-8176-c6560cbd35aa -RoleName CanEdit -AppName 1ec3c80c-c2c0-4ea6-97a8-31d8c8c3d488 -EnvironmentName Default-55abc7e5-2812-4d73-9d2f-8d9017f8c877

Gives the specified security group CanEdit permission to the app with the name 1ec3c80c-c2c0-4ea6-97a8-31d8c8c3d488.

Parameters

-ApiVersion

Specifies the Api version that is called.

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

-AppName

App ID for app where you want to set permission.

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

-EnvironmentName

The environment ID.

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

-Notify

Specifies the option (Notify, DoNotNotify) on notifying the share target.

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

-PrincipalObjectId

If this app is being shared with a user or security group principal, this field specifies the ObjectId for that principal. Use the Get-UsersOrGroupsFromGraph cmdlet to look-up the ObjectId for a user or group in Microsoft Entra ID.

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

-PrincipalType

Specifies the type of principal this app is being shared with; a user, a security group, or the entire tenant.

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

-RoleName

Specifies the permission level given to the app: CanView, CanEdit. Sharing with the entire tenant is only supported for CanView.

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