# PerTenantExtensionCop Error PTE0006
Encryption key functions must not be invoked.
## Description
Encryption key functions must not be invoked.
This rule validates that your extension does not invoke the following methods because they are only supported on-premises:
 ../methods-auto/system/system-createencryptionkey-method
 ../methods-auto/system/system-deleteencryptionkey-method
 ../methods-auto/system/system-exportencryptionkey-method
 ../methods-auto/system/system-importencryptionkey-method
> NOTE
> This applies only to on-premises versions of Business Central.
## How to fix this diagnostic?
You must remove the references to the encryption key methods from your AL code.
## Related information
PerTenantExtensionCop Analyzer<pertenantextensioncop>
Get Started with AL<../devenv-get-started>
Developing Extensions<../devenv-dev-overview>

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