Partager via


Set-AdminPowerAppConnectionRoleAssignment

Sets permissions to the connection.

Syntax

Set-AdminPowerAppConnectionRoleAssignment
   [-ConnectionName] <String>
   -ConnectorName <String>
   -EnvironmentName <String>
   -RoleName <String>
   -PrincipalType <String>
   -PrincipalObjectId <String>
   [-ApiVersion <String>]
   [<CommonParameters>]
Set-AdminPowerAppConnectionRoleAssignment
   [-ConnectionName] <String>
   -ConnectorName <String>
   -EnvironmentName <String>
   -RoleName <String>
   -PrincipalType <String>
   [-PrincipalObjectId <String>]
   [-ApiVersion <String>]
   [<CommonParameters>]

Description

The Set-AdminPowerAppConnectionRoleAssignment sets up permission to a connection depending on the parameters. Use Get-Help Set-AdminPowerAppConnectionRoleAssignment -Examples for more detail.

Examples

EXAMPLE 1

Set-AdminPowerAppConnectionRoleAssignment -PrincipalType Group -PrincipalObjectId b049bf12-d56d-4b50-8176-c6560cbd35aa -RoleName CanEdit -ConnectionName 3b4b9592607147258a4f2fb33517e97a -ConnectorName shared_vsts -EnvironmentName Default-55abc7e5-2812-4d73-9d2f-8d9017f8c877

Gives the specified security group CanEdit permissions to the connection with the ID 3b4b9592607147258a4f2fb33517e97a in the default environment.

Parameters

-ApiVersion

The api version to call with.

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

-ConnectionName

The connection identifier.

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

-ConnectorName

The connection's connector name.

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

-EnvironmentName

The connections's environment ID.

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

-PrincipalObjectId

If this connection 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 connection 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:True
Accept wildcard characters:False

-RoleName

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

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