{"title":"PerTenantExtensionCop Analyzer Rules","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/pertenantextensioncop/","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/pertenantextensioncop, 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/pertenantextensioncop","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":"PerTenantExtensionCop is an analyzer that enforces rules that must be respected by extensions meant to be installed for individual tenants.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"PerTenantExtensionCop Analyzer Rules","slug":"pertenantextensioncop-analyzer-rules","at":0,"chars":3314},{"level":2,"title":"Rules","slug":"rules","at":179,"chars":2979},{"level":2,"title":"Related information","slug":"related-information","at":3158,"chars":156}],"text":"# PerTenantExtensionCop Analyzer Rules\nPerTenantExtensionCop is an analyzer that enforces rules that must be respected by extensions meant to be installed for individual tenants.\n## Rules\nId|Title|Category|Default severity\n--|-----------|--------|----------------\npertenantextensioncop-pte0001|Object ID must be in free range.|Extensibility|Error\npertenantextensioncop-pte0002|Field ID must be in free range.|Extensibility|Error\npertenantextensioncop-pte0003|Procedures must not subscribe to CompanyOpen events|Extensibility|Error\npertenantextensioncop-pte0004|Table definitions must have a matching permission set.|Configuration|Error\npertenantextensioncop-pte0005|The compilation target of an application must be a value that is allowed in a multi-tenant SaaS environment|Extensibility|Error\npertenantextensioncop-pte0006|Encryption key functions must not be invoked.|Extensibility|Error\npertenantextensioncop-pte0007|Test assertion functions are not allowed in a non-test context.|Extensibility|Error\npertenantextensioncop-pte0008|Page controls and actions must use the ApplicationArea property|Extensibility|Error\npertenantextensioncop-pte0009|This app.json property must not be used for per-tenant extensions.|Extensibility|Error\npertenantextensioncop-pte0010|The extension name is too long.|Extensibility|Error\npertenantextensioncop-pte0011|The publisher name is too long.|Extensibility|Error\npertenantextensioncop-pte0012|InternalsVisibleTo should not be used as a security feature.|Extensibility|Warning\npertenantextensioncop-pte0013|Entitlements cannot be defined in an extension.|Configuration|Error\npertenantextensioncop-pte0014|Permission Sets should not be defined in XML files.|Configuration|Warning\npertenantextensioncop-pte0015|The extension name is not valid.|Extensibility|Error\npertenantextensioncop-pte0016|Permission set extensions should not include permissions for objects defined in another application.|Extensibility|Warning\npertenantextensioncop-pte0017|Permission set extensions should not include permission sets defined in another application.|Extensibility|Warning\npertenantextensioncop-pte0018|Permission set extensions should not include permission sets which include permissions for objects defined in another application.|Extensibility|Warning\npertenantextensioncop-pte0019|Permission set extensions should not include wildcard permissions.|Extensibility|Warning\npertenantextensioncop-pte0020|Use the 'application' property instead of specifying an explicit dependency on Base Application.|Extensibility|Warning\npertenantextensioncop-pte0021|Defining reserved namespaces is not allowed.|Configuration|Error\npertenantextensioncop-pte0022|The member ID should be within the allowed range|Extensibility|Info\npertenantextensioncop-pte0023|The enum ordinal value should be within the allowed range|Extensibility|Info\npertenantextensioncop-pte0024|Moving tables or fields is not allowed on per-tenant extensions.|Extensibility|Error\npertenantextensioncop-pte0025|Avoid using duplicate object names|Extensibility|Warning\npertenantextensioncop-pte0026|Table fields should use the AllowInCustomizations property|Extensibility|Hidden\n## Related information\n../devenv-using-code-analysis-tool\n../devenv-rule-set-syntax-for-code-analysis-tools\n../devenv-using-code-analysis-tool-with-rule-set"}