-
Notifications
You must be signed in to change notification settings - Fork 0
New PpacSecurityRole
Create a new security role in a given environment.
New-PpacSecurityRole [-EnvironmentId] <String> [-Name] <String> [-Description] <String> [-AppliesTo] <String>
[-SummaryOfCoreTablePrivileges] <String> [[-MemberPrivilegeInheritance] <String>]
[-IncludeAppOpenerPrivileges] [-ProgressAction <ActionPreference>] [<CommonParameters>]
This cmdlet creates a new security role in a given Power Platform environment.
It mimics the "Create New Role" experience of the security role editor in the Power Platform admin center, including the member privilege inheritance option and the option to include the App Opener privileges needed for running Model-Driven apps.
The role is created in the root business unit of the environment, which makes the role available across all business units. Only roles in the root business unit can be modified.
The role is created without any table privileges, unless the App Opener privileges are included.
New-PpacSecurityRole -EnvironmentId "ContosoEnv" -Name "Monitoring Reader" -Description "Read access for monitoring" -AppliesTo "Monitoring users" -SummaryOfCoreTablePrivileges "Read access to monitoring tables"
This command creates the security role "Monitoring Reader" in the environment "ContosoEnv". The role is created in the root business unit of the environment. The role is documented with a description, the type of users it applies to and a summary of its core table privileges. The role is created without any table privileges.
New-PpacSecurityRole -EnvironmentId "ContosoEnv" -Name "Monitoring Reader" -Description "Read access for monitoring" -AppliesTo "Monitoring users" -SummaryOfCoreTablePrivileges "Read access to monitoring tables" -MemberPrivilegeInheritance "TeamPrivilegesOnly" -IncludeAppOpenerPrivileges
This command creates the security role "Monitoring Reader" in the environment "ContosoEnv". Team members will get all team privileges by default, when the role is assigned to a team. It will include the App Opener privileges for running Model-Driven apps, copied from the built-in "App Opener" security role.
The ID of the environment to create the security role in.
Can be either the environment name, the environment GUID (PPAC) or the LCS environment ID.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name of the security role that you want to create.
Type: String
Parameter Sets: (All)
Aliases: RoleName
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe description of the security role.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe description of the type of users the security role applies to.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe summary of the core table privileges of the security role.
It is saved in the "summaryofcoretablepermissions" column of the security role.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe member privilege inheritance that is used when the security role is assigned to a team.
Valid options: "DirectUserAndTeamPrivileges" - Team members can inherit team privileges directly, based on the Direct User (Basic) access level. "TeamPrivilegesOnly" - Team members get all team privileges by default.
The default value is "DirectUserAndTeamPrivileges".
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: DirectUserAndTeamPrivileges
Accept pipeline input: False
Accept wildcard characters: FalseInstructs the cmdlet to include the App Opener privileges for running Model-Driven apps.
The privileges are copied from the built-in "App Opener" security role in the environment.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Trygve Bechsgaard