{"title":"AppSourceCop Warning AS0103","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0103/","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-as0103, 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-as0103","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":"Table definitions must have a matching permission set.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Warning AS0103","slug":"appsourcecop-warning-as0103","at":0,"chars":2462},{"level":2,"title":"Description","slug":"description","at":85,"chars":70},{"level":2,"title":"Remarks","slug":"remarks","at":155,"chars":146},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":301,"chars":607},{"level":2,"title":"Code examples not triggering the rule","slug":"code-examples-not-triggering-the-rule","at":908,"chars":1407},{"level":3,"title":"Example 1 - Permission defined in XML","slug":"example-1---permission-defined-in-xml","at":1136,"chars":807},{"level":3,"title":"Example 2 - Permission defined in AL","slug":"example-2---permission-defined-in-al","at":1943,"chars":372},{"level":2,"title":"Related information","slug":"related-information","at":2315,"chars":147}],"text":"# AppSourceCop Warning AS0103\nTable definitions must have a matching permission set.\n## Description\nTable definitions must have a matching permission set.\n## Remarks\nTo prevent runtime issues caused by missing permissions, all table definitions in your extension must be included in a permission set.\n## How to fix this diagnostic?\nPermissions can be defined either by using XML, or by using AL permission set objects.\nTo generate XML permission sets, you can use the dedicated command in Visual Studio Code:\n1. Select Ctrl+Shift+P to open the command palette.\n2. Select AL: Generate permission set containing current extension objects. This will generate the XML permission set for your extension.\n3. Rebuild your extension by selecting Ctrl+Shift+B to package the permission set with your extension.\nFor more information about AL permission sets, see Permission Set Object<../devenv-permissionset-object>.\n## Code examples not triggering the rule\nFor the following example, let's consider an extension that has the following source code:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(1; MyField; Integer) { }\n    }\n}\n```\n### Example 1 - Permission defined in XML\n```xml\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<PermissionSets>\n  <PermissionSet RoleID=\"ALPROJECT15\" RoleName=\"ALProject15\">\n    <Permission>\n      <ObjectID>50100</ObjectID>\n      <ObjectType>0</ObjectType>\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```\nThe XML permission set grants access to the table and thereby satisfies the validation. However, the XML approach is discouraged by the AppSourceCop rule AS0094, in which it is recommended instead to use the AL Permission Set object (see Example 2).\n### Example 2 - Permission defined in AL\n```al\npermissionset 50100 MyPermissionSet\n{\n    Assignable = true;\n    Permissions = tabledata MyTable = RIMD;\n}\n```\nThe AL permission set grants access to the table and thereby satisfies the validation.\n> NOTE\n> You can grant access to all your tables using `*`. For instance `tabledata * = R;` grants read access to all of them.\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}