保护对 API 的调用 |不同目录中的 Azure AD 应用

Securing Calls to APIs | Azure AD Apps in Different Directory

如果我的逻辑应用程序在一个目录中,而我的 Azure AD 应用程序在另一个目录中,以下指南是否有效? Secure calls to your custom APIs from logic apps


我的逻辑应用定义于:myLogicApp.onmicrosoft.com

我的 2 个 Azure AD 应用定义于:myB2CTenant.onmicrosoft.com

这行得通吗?

好主意!我做了一个测试,它成功了。

区别在于发行者中GUID(目录ID)的配置Url:

Under Issuer Url, copy and save just the GUID for Part 3. You can also use this GUID in your web app or API app's deployment template, if necessary.

This GUID is your specific tenant's GUID ("tenant ID") and should appear in this URL: https://sts.windows.net/{GUID}

因此,我在我的 A 租户中创建了一个 Web 应用程序,并在 B2C tennat 中创建了一个应用程序注册。

各配置与指南相同。但是当你在https://sts.windows.net/{GUID}中设置GUID时,GUID应该是你的B2C租户ID(目录ID)。

希望对您有所帮助!