locked
.NET Core Console app: Read list of blobs as read-only user RRS feed

  • Question

  • I have a problem, which I cannot figure out to solve:

    Our company has appr. 20 Azure storage accounts with appr. 20 containers each. I want to write a .NET Core console application, which I can run on a (non-Azure) Windows server for backing up the blobs with read-only access.

    If I would use the access keys, I would have the problems a) I would need 20 different access keys and b) the access keys are allowed for full access. With SAS, even worse, I would have appr. 400 different SAS keys.

    Now: I created a new user, e. g. "backup@mycompany.com", which is a global reader - so no possibility to write/delete. I registered my application as a Windows application.

    However, despite reading and trying out so many ways, I was not able to figure out how my console application can automatically log in through e. g. Azure Active Directory (password) with username + password (storing both e. g. in appsettings.json).

    Can you provide .NET Core C# code how I can a) login and b) list all blobs in one storage account >> container?

    Thanks so much!!

    Martin

    Wednesday, July 8, 2020 6:32 PM

Answers

All replies