The Set-AdminPowerAppConnectionRoleAssignment sets up permission to a connection depending on the parameters.
Use Get-Help Set-AdminPowerAppConnectionRoleAssignment -Examples for more detail.
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.
Parameter properties
Type:
String
Default value:
2017-06-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
-ConnectionName
The connection identifier.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
1
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ConnectorName
The connection's connector name.
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 connections's 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
-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.
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 connection 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:
True
Value from remaining arguments:
False
-RoleName
Specifies the permission level given to the connection: CanView, CanViewWithShare, 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:
True
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.