Azure AD B2C、Sendgrid - 请求者的 IP 地址未列入白名单

发布于 2025-01-12 00:01:48 字数 1139 浏览 0 评论 0原文

我已使用自定义策略将发送网格与 Azure AD B2C 集成以发送 OTP 代码。 https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-email-sendgrid?pivots=b2c-custom-policy#create-azure-ad-b2c-policy-key

发送网格已启用 IP 白名单,因此我在发送时收到错误“请求者的 IP 地址未列入白名单”来自 AD B2C 的 OTP。

来自App Insights的日志

outerMessage
Exception Message:Original Exception type:HttpResponseException, responseContent:{"errors":[{"message":"The requestor's IP Address is not whitelisted","field":null,"help":null}]}, Exception Type:PolicyException, CorrelationID:xxxxxxx

details
[{"outerId":"0","message":"Exception Message:Original Exception type:HttpResponseException, responseContent:{\"errors\":[{\"message\":\"The requestor's IP Address is not whitelisted\",\"field\":null,\"help\":null}]}, Exception Type:PolicyException, CorrelationID:xxxxx","type":"System.Exception","id":"42573161"}]

现在我需要将AD B2C租户的IP地址列入白名单,请分享如何获取AD B2C租户的IP地址范围。

I have integrated Send grid with the Azure AD B2C using Custom policies for sending the OTP codes.
https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-email-sendgrid?pivots=b2c-custom-policy#create-azure-ad-b2c-policy-key

The send grid is enabled with the IP whitelisting, So I am getting the error "The requestor's IP Address is not whitelisted" while sending OTP from AD B2C.

Logs from App Insights

outerMessage
Exception Message:Original Exception type:HttpResponseException, responseContent:{"errors":[{"message":"The requestor's IP Address is not whitelisted","field":null,"help":null}]}, Exception Type:PolicyException, CorrelationID:xxxxxxx

details
[{"outerId":"0","message":"Exception Message:Original Exception type:HttpResponseException, responseContent:{\"errors\":[{\"message\":\"The requestor's IP Address is not whitelisted\",\"field\":null,\"help\":null}]}, Exception Type:PolicyException, CorrelationID:xxxxx","type":"System.Exception","id":"42573161"}]

Now I need to whitelist the IP address of AD B2C tenant, Please share how to get the IP address range of the AD B2C Tenant.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文