{"title":"PerTenantExtensionCop Error PTE0006","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/pertenantextensioncop-pte0006/","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-pte0006, 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-pte0006","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":"Encryption key functions must not be invoked.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"PerTenantExtensionCop Error PTE0006","slug":"pertenantextensioncop-error-pte0006","at":0,"chars":848},{"level":2,"title":"Description","slug":"description","at":84,"chars":488},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":572,"chars":111},{"level":2,"title":"Related information","slug":"related-information","at":683,"chars":165}],"text":"# PerTenantExtensionCop Error PTE0006\nEncryption key functions must not be invoked.\n## Description\nEncryption key functions must not be invoked.\nThis rule validates that your extension does not invoke the following methods because they are only supported on-premises:\n ../methods-auto/system/system-createencryptionkey-method\n ../methods-auto/system/system-deleteencryptionkey-method\n ../methods-auto/system/system-exportencryptionkey-method\n ../methods-auto/system/system-importencryptionkey-method\n> NOTE\n> This applies only to on-premises versions of Business Central.\n## How to fix this diagnostic?\nYou must remove the references to the encryption key methods from your AL code.\n## Related information\nPerTenantExtensionCop Analyzer<pertenantextensioncop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}