Поделиться через


Set-AdminPowerAppRoleAssignment

Sets permissions to the app.

Syntax

User (Default)

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

Tenant

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.

Parameter properties

Type:String
Default value:2016-11-01
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AppName

App ID for app where you want to set permission.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-EnvironmentName

The environment ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Notify

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

Parameter properties

Type:String
Default value:Notify
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

User
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrincipalType

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RoleName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.