我正在尝试检查用户是否可以使用其用户凭据登录到特定的sharepoint站点。
from office365.runtime.auth.authentication_context import AuthenticationContext
ctx_auth = AuthenticationContext(url)
try:
if ctx_auth.acquire_token_for_user("email", "password"):
print("Get access")
except:
print("access denied")但是这个sharepoint站点使用多因素身份验证,我得到了以下错误:
An error occurred while retrieving token from XML response: AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '' This question也有类似的问题,答案是使用生成的"client_id“和”client_secret“
除此之外,我还必须检查用户凭据以授予用户访问权限。
这个是可能的吗?
发布于 2021-09-06 09:51:29
据我所知,如果为SharePoint启用了MFA,则不可能使用名称和密码来授予用户访问权限。
https://stackoverflow.com/questions/69070588
复制相似问题