i need to login to Azure from Zabbix server that is located in Azure i enabled identity on the server now i need to login to azure using the identity within a javascript item i saw that in need to import @Azure/Identity but i dont know how i am infrastructure man with low knowledge of JavaScript
I installed npm on the server then
npm install @azure/identity
and then tried this example script that i never got it to work Duktape engin apparently doesnt accept the following
const { BlobServiceClient } = require('@azure/storage-blob');
it should be
var BlobServiceClient = require('azure/storage-blob');
the full example script is this:
// connect-with-default-azure-credential.js
const { BlobServiceClient } = require('@azure/storage-blob');
const { DefaultAzureCredential } = require('@azure/identity');
require('dotenv').config()
const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME;
if (!accountName) throw Error('Azure Storage accountName not found');
const blobServiceClient = new BlobServiceClient(
"https://${accountName}.blob.core.windows.net",
new DefaultAzureCredential()
);