download file from azure storage with token get from msal in angular

153 views Asked by At

I build application in angular that need to download files from azure storage account according to authorization of users in AAD. I used msal to authenticate the user and get token from it but i don't know how to use this token in order to download files from azure storage ,i try to follow the sample code of how to use that tokens in storage account in asp.net https://learn.microsoft.com/en-us/azure/storage/common/storage-auth-aad-app?tabs=dotnet#view-and-run-the-completed-sample but I found it very difficult to the the adjustments in order to make it work in angular,

i also tried different approach involving sas token and build server in node and express to authenticate the users and after it pass to my angular client a sas tokens but i didnt manage to understand how i do it well and further more how I give different access permission to users like i can do in AAD and rbac,i understand there is type of sas that called delegated user but i didn't understand how make it in use.

so what the best practice in order to download files from azure-storage with different access permission to different user in angular prefer using AAD?

i really desperate from try to understand how to do it and work for it almost a month ,I'll apricate any help , regards, gal

0

There are 0 answers