|
| 1 | +--- |
| 2 | +Module Name: PnP.PowerShell |
| 3 | +schema: 2.0.0 |
| 4 | +applicable: SharePoint Online |
| 5 | +online version: https://pnp.github.io/powershell/cmdlets/Remove-PnPPowerAppPermission.html |
| 6 | +external help file: PnP.PowerShell.dll-Help.xml |
| 7 | +title: Remove-PnPPowerAppPermission |
| 8 | +--- |
| 9 | + |
| 10 | +# Remove-PnPPowerAppPermission |
| 11 | + |
| 12 | +## SYNOPSIS |
| 13 | + |
| 14 | +**Required Permissions** |
| 15 | + |
| 16 | +* Azure: management.azure.com |
| 17 | +* PowerApps: service.powerapps.com |
| 18 | +* Microsoft Graph: User.Read.All, Group.Read.All |
| 19 | + |
| 20 | +Removes user, group and (Everyone in organization) permissions from a Power App |
| 21 | + |
| 22 | + |
| 23 | +## SYNTAX |
| 24 | + |
| 25 | +```powershell |
| 26 | +Remove-PnPPowerAppPermission [-Environment <PowerAutomateEnvironmentPipeBind>] -Identity <PowerPlatformPipeBind> [-User <String>] [-Group <String>] [-Tenant] [-AsAdmin] [-Force] [-Verbose] |
| 27 | +``` |
| 28 | + |
| 29 | +## DESCRIPTION |
| 30 | +This cmdlet removes user, group, or (Everyone in organization) permissions from a PowerApp using the -User, -Group, or -Tenant parameter. Only one of these parameters can be specified at a time, and at least one must be provided. |
| 31 | + |
| 32 | +## EXAMPLES |
| 33 | + |
| 34 | +### Example 1 |
| 35 | +```powershell |
| 36 | +Remove-PnPPowerAppPermission -Identity 9b2f87e6-4c3d-48c0-a2b6-c1b4e3e57f0f -User [email protected] |
| 37 | +``` |
| 38 | +Removes the specified user permission from the specified PowerApp located in the default environment using user's UPN |
| 39 | + |
| 40 | +### Example 2 |
| 41 | +```powershell |
| 42 | +Remove-PnPPowerAppPermission -Identity 9b2f87e6-4c3d-48c0-a2b6-c1b4e3e57f0f -User 6844c04a-8ee7-40ad-af66-28f6e948cd04 |
| 43 | +``` |
| 44 | +Removes the specified user permission from the specified PowerApp located in the default environment using user's Id |
| 45 | + |
| 46 | +### Example 3 |
| 47 | +```powershell |
| 48 | +Remove-PnPPowerAppPermission -Environment (Get-PnPPowerPlatformEnvironment -Identity "myenvironment") -Identity 9b2f87e6-4c3d-48c0-a2b6-c1b4e3e57f0f -User [email protected] -AsAdmin |
| 49 | +``` |
| 50 | +Removes the specified user permission from the specified PowerApp as an admin in the specified environment |
| 51 | + |
| 52 | +### Example 4 |
| 53 | +```powershell |
| 54 | +Remove-PnPPowerAppPermission -Environment (Get-PnPPowerPlatformEnvironment -Identity "myenvironment) -Identity 9b2f87e6-4c3d-48c0-a2b6-c1b4e3e57f0f -User [email protected] -AsAdmin -Force |
| 55 | +``` |
| 56 | +Removes the specified user permission from the specified PowerApp as admin, without asking for confirmation, in the specified environment |
| 57 | + |
| 58 | +### Example 5 |
| 59 | +```powershell |
| 60 | +Remove-PnPPowerAppPermission -Identity "3f4a2c1d-0e9d-4c1e-8b55-9e3c7f0ba7e2" -Group "c6c4b4e0-cd72-4d64-8ec2-cfbd0388ec16" -Force |
| 61 | +``` |
| 62 | +Removes the specified group's permission for the PowerApp without prompting using group id |
| 63 | + |
| 64 | +### Example 6 |
| 65 | +```powershell |
| 66 | +Remove-PnPPowerAppPermission -Identity "3f4a2c1d-0e9d-4c1e-8b55-9e3c7f0ba7e2" -Group "Finance Team" |
| 67 | +``` |
| 68 | +Removes the specified group's permission for the PowerApp using group's display name |
| 69 | + |
| 70 | +### Example 7 |
| 71 | +```powershell |
| 72 | +Remove-PnPPowerAppPermission -Identity "3f4a2c1d-0e9d-4c1e-8b55-9e3c7f0ba7e2" -Tenant |
| 73 | +``` |
| 74 | +Removes the (Everyone in organization) permission for the PowerApp using -Tenant parameter |
| 75 | + |
| 76 | +## PARAMETERS |
| 77 | + |
| 78 | +### -Environment |
| 79 | +The name of the Power Platform environment or an Environment instance. If omitted, the default environment will be used. |
| 80 | + |
| 81 | +```yaml |
| 82 | +Type: PowerPlatformEnvironmentPipeBind |
| 83 | +Parameter Sets: (All) |
| 84 | +Aliases: |
| 85 | + |
| 86 | +Required: False |
| 87 | +Position: Named |
| 88 | +Default value: The default environment |
| 89 | +Accept pipeline input: True |
| 90 | +Accept wildcard characters: False |
| 91 | +``` |
| 92 | +
|
| 93 | +### -Identity |
| 94 | +The Name, Id or instance of the PowerApp to remove the permissions from. |
| 95 | +
|
| 96 | +```yaml |
| 97 | +Type: PowerPlatformPipeBind |
| 98 | +Parameter Sets: (All) |
| 99 | +Aliases: |
| 100 | + |
| 101 | +Required: True |
| 102 | +Position: Named |
| 103 | +Default value: None |
| 104 | +Accept pipeline input: False |
| 105 | +Accept wildcard characters: False |
| 106 | +``` |
| 107 | +
|
| 108 | +### -User |
| 109 | +The user principal name or Id of the user to remove its permissions from the PowerApp. |
| 110 | +
|
| 111 | +```yaml |
| 112 | +Type: String |
| 113 | +Parameter Sets: (All) |
| 114 | + |
| 115 | +Required: False |
| 116 | +Position: Named |
| 117 | +Default value: None |
| 118 | +Accept pipeline input: False |
| 119 | +Accept wildcard characters: False |
| 120 | +``` |
| 121 | +
|
| 122 | +### -Group |
| 123 | +The group display name or Id of the group to remove its permissions from the PowerApp. |
| 124 | +
|
| 125 | +```yaml |
| 126 | +Type: String |
| 127 | +Parameter Sets: (All) |
| 128 | + |
| 129 | +Required: False |
| 130 | +Position: Named |
| 131 | +Default value: None |
| 132 | +Accept pipeline input: False |
| 133 | +Accept wildcard characters: False |
| 134 | +``` |
| 135 | +
|
| 136 | +### -Tenant |
| 137 | +The (Everyone in organization) permission to remove from the PowerApp |
| 138 | +
|
| 139 | +```yaml |
| 140 | +Type: String |
| 141 | +Parameter Sets: (All) |
| 142 | + |
| 143 | +Required: False |
| 144 | +Position: Named |
| 145 | +Default value: None |
| 146 | +Accept pipeline input: False |
| 147 | +Accept wildcard characters: False |
| 148 | +``` |
| 149 | +
|
| 150 | +### -AsAdmin |
| 151 | +If specified, the permission will be removed as an admin. If not specified only the Apps to which the current user already has access can be modified. |
| 152 | +
|
| 153 | +```yaml |
| 154 | +Type: SwitchParameter |
| 155 | +Parameter Sets: (All) |
| 156 | +Aliases: |
| 157 | + |
| 158 | +Required: False |
| 159 | +Position: Named |
| 160 | +Default value: None |
| 161 | +Accept pipeline input: False |
| 162 | +Accept wildcard characters: False |
| 163 | +``` |
| 164 | +
|
| 165 | +### -Force |
| 166 | +Providing the Force parameter will skip the confirmation question. |
| 167 | +
|
| 168 | +```yaml |
| 169 | +Type: SwitchParameter |
| 170 | +Parameter Sets: (All) |
| 171 | + |
| 172 | +Required: False |
| 173 | +Position: Named |
| 174 | +Default value: None |
| 175 | +Accept pipeline input: False |
| 176 | +Accept wildcard characters: False |
| 177 | +``` |
| 178 | +
|
| 179 | +## RELATED LINKS |
| 180 | +
|
| 181 | +[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) |
0 commit comments