c# - Azure 逻辑应用使用 MSI 向 WebApp 进行身份验证

标签 c# azure azure-logic-apps azure-managed-identity

有人曾经设法在 LogicApp 和 WebApp 之间实现 MSI 身份验证吗? (假设这是可能的)。我设法找到的唯一示例是将 MSI 与 Keyvault、存储等服务一起使用。

最佳答案

如果我理解正确的话,您的 API 托管在 Azure Web 应用中,并且您希望使用 MSI 调用逻辑应用中的 API,如果是这样,您可以按照以下步骤操作。

  1. 导航到门户中的 Web 应用 -> 身份验证/授权 -> 启用 Web 应用的 Azure AD 身份验证,请按照此操作 doc .

注意:请选择如下所示的创建新的 AD 应用,然后 Azure 会自动为您配置 AD 应用,这样可以避免许多配置问题。

enter image description here

最后选择Log in with Azure Active Directory,完成所有配置后如下所示。

enter image description here

  • 导航到门户中的逻辑应用 -> Identity -> enable the system-assigned identity .

  • 在逻辑应用程序设计器中,使用如下所示的 Http 操作(在我的示例中,为了轻松测试它,我使用 azure 函数而不是 Web 应用程序,它们是相同的逻辑,只需在您的情况下使用 Web 应用程序),将 Audience 替换为您的网络应用程序的 URL。

  • enter image description here

    结果:

    enter image description here

    关于c# - Azure 逻辑应用使用 MSI 向 WebApp 进行身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65593166/

    相关文章:

    azure - 使用Azure逻辑应用程序解压缩并重命名底层文件

    c# - 我如何以编程方式判断网站上的二进制文件(例如图像)是否在不下载的情况下发生了变化?

    c# - foreach 特定列中的标签,C#

    c# - 多对多映射表

    c# - 我可以使用什么来与 PLC 的 HMS AnyBus AB7007 网关进行通信

    Azure 逻辑应用 - GetEntities(Azure 表)连接器筛选器返回错误结果

    azure - 使用 Azure 数据工厂和逻辑应用时,访问已被条件访问策略阻止

    Azure 数据工厂 |从 SFTP 到 Blob 的增量数据加载

    azure - 如何知道我的 Azure 角色实例 VM 是否已重新启动?

    azure-logic-apps - 逻辑应用程序的 "Azure Queues"触发器 - 没有关于设置的帮助或文档