You can use AzureStor from within your server app like any other R package. See the AzureStor vignette for some syntax examples.
To authenticate, you have a few options depending on what type of storage you're using:
- Use the account key. Not recommended, as it provides full access to everything in the account.
- Use a SAS. Better, but you'll have to remember to renew it when it expires.
- Authenticate with an AAD token, using client credentials.
- Authenticate with an AAD token, with user credentials (getting the user to login).
The latter 2 options would involve obtaining a token with the AzureAuth package. The client credentials flow can be done entirely within the server, so is probably a good starting point. The last option would require splitting the flow between the server and UI; see the AzureAuth Shiny vignette for some example code.