How to pre-sign Url in azure using javascript SDK with App registrations - Application (client) ID, client secret (value), Tenant_id and also account name, container name, blob name. I am not able to generate Container Level SAS token for giving temporary access to my files.
const account = "accountName";
const containerName = "containerName";
const blobName = "blob";
const credential = new ClientSecretCredential(
"AZURE_TENANT_ID",
"AZURE_CLIENT_ID",
"AZURE_CLIENT_SECRET"
);
const blobServiceClient = new BlobServiceClient(
`https://${account}.blob.core.windows.net`,
credential
);
const containerClient = blobServiceClient.getContainerClient(containerName);
let blobs = containerClient.listBlobsFlat({includeMetadata: true}); // works ok
await credential.getToken(); // how to generate sas token for my container to sign url ?
I do not want to use the account key, and it seems generateBlobSASQueryParameters function works with account key.