# PerTenantExtensionCop Analyzer Rules
PerTenantExtensionCop is an analyzer that enforces rules that must be respected by extensions meant to be installed for individual tenants.
## Rules
Id|Title|Category|Default severity
--|-----------|--------|----------------
pertenantextensioncop-pte0001|Object ID must be in free range.|Extensibility|Error
pertenantextensioncop-pte0002|Field ID must be in free range.|Extensibility|Error
pertenantextensioncop-pte0003|Procedures must not subscribe to CompanyOpen events|Extensibility|Error
pertenantextensioncop-pte0004|Table definitions must have a matching permission set.|Configuration|Error
pertenantextensioncop-pte0005|The compilation target of an application must be a value that is allowed in a multi-tenant SaaS environment|Extensibility|Error
pertenantextensioncop-pte0006|Encryption key functions must not be invoked.|Extensibility|Error
pertenantextensioncop-pte0007|Test assertion functions are not allowed in a non-test context.|Extensibility|Error
pertenantextensioncop-pte0008|Page controls and actions must use the ApplicationArea property|Extensibility|Error
pertenantextensioncop-pte0009|This app.json property must not be used for per-tenant extensions.|Extensibility|Error
pertenantextensioncop-pte0010|The extension name is too long.|Extensibility|Error
pertenantextensioncop-pte0011|The publisher name is too long.|Extensibility|Error
pertenantextensioncop-pte0012|InternalsVisibleTo should not be used as a security feature.|Extensibility|Warning
pertenantextensioncop-pte0013|Entitlements cannot be defined in an extension.|Configuration|Error
pertenantextensioncop-pte0014|Permission Sets should not be defined in XML files.|Configuration|Warning
pertenantextensioncop-pte0015|The extension name is not valid.|Extensibility|Error
pertenantextensioncop-pte0016|Permission set extensions should not include permissions for objects defined in another application.|Extensibility|Warning
pertenantextensioncop-pte0017|Permission set extensions should not include permission sets defined in another application.|Extensibility|Warning
pertenantextensioncop-pte0018|Permission set extensions should not include permission sets which include permissions for objects defined in another application.|Extensibility|Warning
pertenantextensioncop-pte0019|Permission set extensions should not include wildcard permissions.|Extensibility|Warning
pertenantextensioncop-pte0020|Use the 'application' property instead of specifying an explicit dependency on Base Application.|Extensibility|Warning
pertenantextensioncop-pte0021|Defining reserved namespaces is not allowed.|Configuration|Error
pertenantextensioncop-pte0022|The member ID should be within the allowed range|Extensibility|Info
pertenantextensioncop-pte0023|The enum ordinal value should be within the allowed range|Extensibility|Info
pertenantextensioncop-pte0024|Moving tables or fields is not allowed on per-tenant extensions.|Extensibility|Error
pertenantextensioncop-pte0025|Avoid using duplicate object names|Extensibility|Warning
pertenantextensioncop-pte0026|Table fields should use the AllowInCustomizations property|Extensibility|Hidden
## Related information
../devenv-using-code-analysis-tool
../devenv-rule-set-syntax-for-code-analysis-tools
../devenv-using-code-analysis-tool-with-rule-set

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. https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/pertenantextensioncop/
