Remove-NavServerUserPermissionSet does not respect Scope parameter
1. Describe the bug In BC 24 on-premises (all update versions, including the current release 24.4) it is not possible to remove a permission set assignment to a user using a PowerShell command, if the permission set is provided by an extension.
2. To Reproduce Start the "Business Central Administration Shell". Execute the following commands (if not using a Docker container, adjust the ServerInstance parameter as required):
New-NAVServerUser -ServerInstance BC -UserName DEMO New-NavServerUserPermissionSet -ServerInstance BC -UserName DEMO -PermissionSetId "D365 ACC . PAYABLE" -AppName "Base Application" New-NavServerUserPermissionSet -ServerInstance BC -UserName ADMIN -PermissionSetId "D365 ACC. PAYABLE" -AppName "Base Application" Remove-NavServerUserPermissionSet -ServerInstance BC -UserName DEMO -PermissionSetId "D365 ACC. PAYABLE" -AppName "Base Application" -Scope System
Error message is shown: "There is no Access Control within the filter. Filters: User Security ID: {2B2D3B0E-FE25-4978-A982-D3CE4462477B}, Role ID: D365 ACC. PAYABLE, Company Name: '', Scope: Tenant, App ID: {437DBF0E-84FF-417A-965D-ED2BB9650972}"
3. Expected behavior The command should function similarly to New-ServerUserPermissionSet as documented by Microsoft.
4. Actual behavior As soon as the parameter AppName is specified, the Scope parameter "System" is ignored and an error message with Filter "Scope: Tenant" is shown. It is not possible to remove a user permission set assignment using Powershell commands in an on-premise installation of BC 24 (any update version).
User-defined permission sets that are in the Tenant scope can be removed successfully. This is consistent with the bug, as the command always sets the scope to Tenant regardless of the Scope parameter passed to it.
5. Versions:
- Business Central: 24.4.22295.22576 Using Docker retrieved from this URL: Get-BcArtifactUrl -type 'OnPrem' -country 'de' -version ''24.4.22295.22576''
Hi, this issue is out of scope of for this repository. You should do one of the following:
Open a support request to CSS through the PartnerSource portal Open a bug in Collaborate Contact your Service Account Manager (SAM) in your local subsidiary to understand what is included in your contract as of support incident and PAH (Partner Advisory Hours). Your SAM might also direct you "step by step" how to open a support request or how to get credentials, if this is the first time for you or your company As a reminder, this repository only handles issues to do with the compiler or VSCode development experience for AL.