Install
$ agentstack add skill-emgreppi-business-central-ai-skill-integrating-azure-services Open-source listing — not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
⚠ Flagged1 finding(s); flagged for manual review. · v0.1.0 How review works →
- • Prompt-injection patterns
- • Secret / credential exfiltration
- • Dangerous shell & filesystem operations
- • Untrusted network calls
- • Known-malicious package signatures
- high Dangerous shell/eval execution.
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ● Dynamic code execution Used
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Skill: AL Azure Integration
Validation Gates
- After Step 2: Azure Function responds to HTTP request from Postman
- After Step 3: AL code successfully calls function, receives response
- Final: Logic App triggers on BC event, performs expected action
Note: In-process model deprecated Nov 2026. Use Isolated Worker (.NET 8+).
Procedure
Step 1: Create Azure Function (Isolated Worker)
// Program.cs
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults()
.Build();
host.Run();
// MyFunction.cs
[Function("MyFunction")]
public async Task Run(
[HttpTrigger(AuthorizationLevel.Function, "post")] HttpRequestData req)
{
var response = req.CreateResponse(HttpStatusCode.OK);
await response.WriteStringAsync("Result");
return response;
}
Required in .csproj: net8.0 + Exe
Step 2: Deploy and Get Function URL
- Deploy to Azure (VS Code / CLI / GitHub Actions)
- Copy Function URL + Key from Azure Portal → Function App → Functions → Get Function Url
Step 3: Call Function from AL
procedure CallAzureFunction(InputData: Text): Text
var
AzureFunction: Codeunit "Azure Functions";
AzureFunctionResponse: Codeunit "Azure Functions Response";
AzureFunctionAuth: Codeunit "Azure Functions Authentication";
IAzureFunctionAuth: Interface "Azure Functions Authentication";
ResponseText: Text;
begin
IAzureFunctionAuth := AzureFunctionAuth.CreateCodeAuth(GetFunctionUrl(), GetFunctionKey());
AzureFunctionResponse := AzureFunction.SendPostRequest(
IAzureFunctionAuth,
'{"data": "' + InputData + '"}',
'application/json');
if AzureFunctionResponse.IsSuccessful() then
AzureFunctionResponse.GetResultAsText(ResponseText)
else
Error('Azure Function failed: %1', AzureFunctionResponse.GetError());
exit(ResponseText);
end;
local procedure GetFunctionKey(): Text
var
FunctionKey: Text;
begin
if IsolatedStorage.Get('AzureFunctionKey', DataScope::Company, FunctionKey) then
exit(FunctionKey);
Error('Azure Function key not configured');
end;
Step 4: Create Logic App (Optional)
Common triggers:
When a Business Event occurs→ React to BC eventsRecurrence→ Scheduled data syncWhen file added to SharePoint→ File processing
BC Connector (GA 2024): Use Managed Identity for auth. Enable Run History for debugging.
Authentication Options
| Method | Code | Use Case | |--------|------|----------| | Function Key | CreateCodeAuth(url, key) | Simple scenarios | | Azure AD | CreateOAuth2(url, ...) | Enterprise | | Managed Identity | Via Azure AD | Logic Apps |
Binary Response (Images/PDFs)
if AzureFunctionResponse.IsSuccessful() then begin
AzureFunctionResponse.GetResultAsStream(ResultInStream);
DownloadFromStream(ResultInStream, 'Download', '', '', FileName);
end;
Hosting Plans
| Plan | Cold Start | Best For | |------|------------|----------| | Consumption | Yes | Sporadic | | Flex Consumption | Optional | Production | | Premium | No | High-frequency |
Important Notes
Security: Never hardcode function keys → Isolated Storage. Use Azure AD for production.
Telemetry: Add to Program.cs for unified BC + Functions monitoring:
.ConfigureServices(services => {
services.AddApplicationInsightsTelemetryWorkerService();
})
References
See references/ folder for:
azure-functions-patterns.md- Complete .NET examples
External Documentation
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: emgreppi
- Source: emgreppi/Business-Central-AI-Skill
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.