Azure MSI是否支持Azure Scheduler?相关计划及C#实现咨询
Hey there! Let's clarify your questions about Azure MSI and Azure Scheduler step by step:
Current Support Status
- First off, Azure Scheduler is a retired service: Microsoft officially replaced it with Azure Logic Apps back in 2020, and no new feature updates or support are provided for Scheduler anymore.
- Given this, Azure Managed Service Identity (MSI) has never supported Azure Scheduler, and there are no plans to add support in the future. Since the service itself is deprecated, the team won't invest resources into building new integrations for it.
Alternative: Use Azure Logic Apps (Full MSI Support)
Since Scheduler is no longer maintained, migrating to Azure Logic Apps is the recommended path—it covers all Scheduler use cases, offers more advanced features, and fully supports MSI.
C# Implementation Example (Logic Apps + MSI)
If you need to work with Logic Apps via C# using MSI, here's a practical breakdown:
- Fetch an MSI access token for authenticating against Azure's management API:
using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; using Newtonsoft.Json.Linq; public async Task<string> GetMsiAuthToken() { using var httpClient = new HttpClient(); var tokenRequest = new HttpRequestMessage( HttpMethod.Get, "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/" ); tokenRequest.Headers.Add("Metadata", "true"); var response = await httpClient.SendAsync(tokenRequest); response.EnsureSuccessStatusCode(); var responseContent = await response.Content.ReadAsStringAsync(); var token = JObject.Parse(responseContent)["access_token"].ToString(); return token; }
- Trigger or manage a Logic App using the MSI token:
public async Task TriggerTargetLogicApp(string logicAppTriggerUrl, string msiToken) { using var httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", msiToken); var triggerResponse = await httpClient.PostAsync(logicAppTriggerUrl, null); triggerResponse.EnsureSuccessStatusCode(); }
Note: Make sure the system-assigned or user-assigned MSI for your Logic App has the necessary permissions (like
Logic App Contributor) to perform management operations via the API.
Why Scheduler Isn't Mentioned in MSI Docs
The absence of Azure Scheduler in the Managed Service Identity (MSI) for Azure resources documentation is intentional. Since Scheduler is a retired service, Microsoft no longer includes it in active service integration docs—all guidance now focuses on its replacement, Azure Logic Apps.
内容的提问来源于stack exchange,提问作者vivek jain

