bcquality/microsoft/knowledge/security/secrets-isolated-storage.good.al
Jesper Schulz-Wedde c9d90ac605 Promote validated community knowledge
Move eight net-new rules into the Microsoft layer, remove six overlapping articles, and update review skill discovery and references.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0b130227-d418-4bc0-9e7d-ec6a37adf039
2026-07-14 14:14:07 +02:00

15 lines
550 B
AL

codeunit 50134 "Api Credential Good Sample"
{
procedure StoreApiKey(ApiKey: SecretText)
begin
// Credentials live in IsolatedStorage, invisible to record reads, API
// pages, RapidStart packages, and Excel export.
IsolatedStorage.SetEncrypted('ExternalApiKey', ApiKey, DataScope::Module);
end;
procedure GetApiKey() ApiKey: SecretText
begin
if not IsolatedStorage.Get('ExternalApiKey', DataScope::Module, ApiKey) then
Error('The external API key has not been configured.');
end;
}