we have utlise this link and others to upload a file from x++ to azure blob via SAS token. However, we want to achive the same via managed identity as the internal security has forbidden usage of Keys. I know that this involvs
- Registering an Appid
- Providing IAM access to the blob storage as data contributor/data owner role for the app id.
- Generating access token in x++ based on tenantid, appid, secret, scope
- utilise the access token to upload the file to azure blob.
I am unable to achieve step 4 via x++ code. Please help and also suggest any alternative OOB solution if applicable.
thanks.
2
Answers
thanks for the response. Below is how we have achieved for x++ however i will accept the .net solution which is also ans to this post considering the effort made for the reponse :)
Initially, I registered one application and granted Storage API permission in it as below:
Under storage account, I added "Storage Blob Data Contributor" role to above application like this:
In my case, I used below sample c# code to upload file to Azure Storage account:
Response:
To confirm that, I checked the same in Azure Portal where file uploaded successfully as below: