Search code examples
azurechatbotrestart

Scheduled restart with webJob @azure


I want to use a webJob (found no other option) to restart my chatBot every day at noon.

Everything I found online only works with a "Service Principal Id", but you need to be a global admin to get one. Is there any possibility to do a scheduled restart without webJobs / Service Principal Id?

I am the owner of the subscription and the app service I want to restart, but no Azure AD global admin due to company restrictions.


Solution

  • You don't have to use Web Jobs for that, there is a better option.

    You should be able to create a time-triggered Azure Function with Managed Identity (formerly known as MSI). Then you can assign e. g. Contributor rights to that Azure Function Instance for your ChatBot.

    Note: Managed Identity will internally also create a special type of service principal. But this principle is managed by Azure.

    Further reading: How to use managed identities for App Service and Azure Functions