我可能阅读了10个不同的故事,但都出现了相同的错误,但仍然无法通过python代码进行调用以获取Azure Data Lake的令牌。你能帮上忙吗..不确定我在想什么..谢谢
这是我的python代码的外观:
import requests
url = "https://login.microsoftonline.com/<tenantID>/oauth2/token"
params = "grant_type=client_credentials&resource=https://management.core.windows.net&client_id=<CID>&client_secret=<CS>"
headers = {
'content-type': "application/x-www-form-urlencoded",
'cache-control': "no-cache",
}
response = requests.request("POST", url= url, headers=headers, params= params)
print(response.text)
“ AADSTS90014:请求正文必须包含以下参数:'grant_type'