简体   繁体   English

Salesforce MFA 在 simple-salesforce

[英]Salesforce MFA in simple-salesforce

I am currently using the simple-salesforce library to retrieve data from Salesforce, using the token method.我目前正在使用simple-salesforce库使用令牌方法从 Salesforce 检索数据。

from simple_salesforce import Salesforce

sf = Salesforce(username='myemail@example.com', password='password', security_token='token')

But Salesforce is requiring the implementation of a Multi-Factor Authentication, is there anyway I can bypass this or use another method?但是 Salesforce 需要实施多重身份验证,无论如何我可以绕过这个或使用其他方法吗?

Here is the link of the actual article: https://help.salesforce.com/articleView?id=000356005&type=1&mode=1这是实际文章的链接: https://help.salesforce.com/articleView?id=000356005&type=1&mode=1

Thanks!谢谢!

I think MFA will be required only for users using the standard login - from the Help article mentioned above , it says: "All internal users who log in to Salesforce products* (including partner solutions) through the user interface must use MFA. To ensure that MFA is enabled for all your Salesforce users, you can turn it on directly in your Salesforce products or use your SSO provider's MFA service."我认为只有使用标准登录的用户才需要 MFA - 从上面提到的帮助文章中,它说:“所有通过用户界面登录到 Salesforce 产品*(包括合作伙伴解决方案)的内部用户都必须使用 MFA。为了确保如果您的所有 Salesforce 用户启用了 MFA,您可以直接在 Salesforce 产品中打开它,或使用您的 SSO 提供商的 MFA 服务。”

But you are auth'ing via the API, right?但是您是通过 API 进行身份验证的,对吧?

Can you share an error message or screenshot?您可以分享错误消息或屏幕截图吗?

Typically API auths happen via a connected app configured in the org, and as I recall, the connected app has a setting requiring MFA... This help article goes into greater detail about where MFA is required (which login approaches)通常 API 身份验证是通过在组织中配置的连接应用程序发生的,我记得,连接的应用程序有一个需要 MFA 的设置... 这篇帮助文章更详细地介绍了需要 MFA 的位置(登录方法)

Could it be that you are running into the standard user verification challenge whenever salesforce sees an auth for a user from a new network location.每当 salesforce 从新的网络位置看到用户的身份验证时,您是否会遇到标准用户验证挑战。 You can disable that here by setting an IP address range.您可以通过设置 IP 地址范围禁用它。

I have found one solution:我找到了一种解决方案:

https://github.com/simple-salesforce/simple-salesforce/issues/457 https://github.com/simple-salesforce/simple-salesforce/issues/457

In my case, I was not using an API user account, rather just a normal user account.就我而言,我没有使用 API 用户帐户,而只是普通用户帐户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM