【发布时间】:2016-06-20 15:58:17
【问题描述】:
试试Azure ADAL for Python。导入 adal 时出现此错误。
import adal
报错
token_response = adal.acquire_token_with_username_password(
AttributeError: 'module' object has no attribute 'acquire_token_with_username_password'
我从 Github 下载了最新的代码。
README 包含使用 acquire_token_with_username_password 的示例代码,因此它应该存在。
我错过了什么?
import adal
token_response = adal.acquire_token_with_username_password(
'https://login.windows.net/ACTIVE_DIRECTORY_TENANT.onmicrosoft.com',
'username@ACTIVE_DIRECTORY_TENANT.onmicrosoft.com',
'password'
)
【问题讨论】:
标签: python python-2.7 azure azure-active-directory adal