/// <summary> /// Download the blob corresponding to the provided blob url. Note this will only work if your AAD App has been onboarded to blob storage /// </summary> /// <param name="blobLocation"></param> /// <returns></returns> public async System.Threading.Tasks.Task GetReportDataBlobAsync(string blobLocation) { string accessToken = AADTokenHelper.GetAADTokenForStorageResourceAsync().Result; TokenCredential tokenCredential = new TokenCredential(accessToken); StorageCredentials storageCredentials = new StorageCredentials(tokenCredential); CloudBlockBlob blob = new CloudBlockBlob(new Uri(blobLocation), storageCredentials); try { await blob.DownloadToFileAsync(blob.Name, FileMode.Create); } catch (Exception e) { Console.Write(e.Message); } }