# AppSourceCop Warning AS0094
Permission Sets should not be defined in XML files.
## Description
Permission sets should not be defined in XML. Instead, use the dedicated AL object for 'PermissionSet'.
## Example of XML file triggering the rule
```xml
<?xml version="1.0" encoding=""utf-8""?>
<PermissionSets>
  <PermissionSet RoleID="TestProjectPermissionSet" RoleName="Default">
    <Permission>
      <ObjectType>8</ObjectType>
      <ObjectID>70001</ObjectID>
      <ReadPermission>1</ReadPermission>
      <InsertPermission>1</InsertPermission>
      <ModifyPermission>1</ModifyPermission>
      <DeletePermission>1</DeletePermission>
      <ExecutePermission>0</ExecutePermission>
      <SecurityFilter />
    </Permission>
  </PermissionSet>
</PermissionSets>
```
### Converted into a PermissionSet object
For a table called "Floor Manager" with object ID 70001, we can convert the above permissions defined in XML into a permission set object defined in AL as shown below:
```al
permissionset 50130 MyPermissionSet
{
    Assignable = true;
    Caption = 'My PermissionSet';

    Permissions =
        tabledata "Floor Manager" = RIMD;
}
```
The RIMD access allows access to Read, Insert, Modify, and Delete entries in the table. This can be modified by adding and removing letters corresponding to the first letter of the permission that you want to (dis)allow. This permission set can then be assigned to users/roles.
## How to fix this diagnostic?
You can convert XML permission sets to AL objects. See Upgrading Permissions Sets and Permissions<../../upgrade/upgrade-permissions>.
## Related information
../devenv-permissionset-object
AppSourceCop Analyzer<appsourcecop>
Get Started with AL<../devenv-get-started>
Developing Extensions<../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0094, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0094/
