I have written a c# module (console) which queries and updates information in a SharePoint site. Currently, running from my desktop it uses hard-coded credentials with permissions for the relevant site collection. When I move this to production, I want to host the app in Azure.

Note: there is no front-end, it is merely a process which will run on a schedule and consequently there is no logged in user.

This must be a common requirement but I can find no definitive answer to how I should tackle this.

Thanks to anyone who can help.

1 Answer 1


Best practice is to use Azure Key vault. Here's a tutorial. It assumes a .NET Core web app but the process would be similar for a console app.

As for deployment to Azure, you can take your console app and deploy it as an Azure WebJob and run it on a schedule via cron expression. https://docs.microsoft.com/en-us/azure/app-service/webjobs-create

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.