{"title":"AppSourceCop Warning AS0094","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0094/","by":"JOP-AL","license":"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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0094","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Permission sets should not be defined in XML.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Warning AS0094","slug":"appsourcecop-warning-as0094","at":0,"chars":1769},{"level":2,"title":"Description","slug":"description","at":82,"chars":119},{"level":2,"title":"Example of XML file triggering the rule","slug":"example-of-xml-file-triggering-the-rule","at":201,"chars":1225},{"level":3,"title":"Converted into a PermissionSet object","slug":"converted-into-a-permissionset-object","at":770,"chars":656},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":1426,"chars":165},{"level":2,"title":"Related information","slug":"related-information","at":1591,"chars":178}],"text":"# AppSourceCop Warning AS0094\nPermission Sets should not be defined in XML files.\n## Description\nPermission sets should not be defined in XML. Instead, use the dedicated AL object for 'PermissionSet'.\n## Example of XML file triggering the rule\n```xml\n<?xml version=\"1.0\" encoding=\"\"utf-8\"\"?>\n<PermissionSets>\n  <PermissionSet RoleID=\"TestProjectPermissionSet\" RoleName=\"Default\">\n    <Permission>\n      <ObjectType>8</ObjectType>\n      <ObjectID>70001</ObjectID>\n      <ReadPermission>1</ReadPermission>\n      <InsertPermission>1</InsertPermission>\n      <ModifyPermission>1</ModifyPermission>\n      <DeletePermission>1</DeletePermission>\n      <ExecutePermission>0</ExecutePermission>\n      <SecurityFilter />\n    </Permission>\n  </PermissionSet>\n</PermissionSets>\n```\n### Converted into a PermissionSet object\nFor 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:\n```al\npermissionset 50130 MyPermissionSet\n{\n    Assignable = true;\n    Caption = 'My PermissionSet';\n\n    Permissions =\n        tabledata \"Floor Manager\" = RIMD;\n}\n```\nThe 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.\n## How to fix this diagnostic?\nYou can convert XML permission sets to AL objects. See Upgrading Permissions Sets and Permissions<../../upgrade/upgrade-permissions>.\n## Related information\n../devenv-permissionset-object\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}