未监视
标记不受 Microsoft 监视。
50 个问题
在我使用python写一个微软登录验证时返回错误,详细返回如下:
{'error': 'invalid_request', 'error_description': "AADSTS900144: The request body must contain the following parameter: 'grant_type'. Trace ID: d831696a-8ad7-4778-8ce9-b97ec44efc01 Correlation ID: f4750481-1c18-48c3-9247-2a98d786554b Timestamp: 2024-12-17 13:50:01Z", 'error_codes': [900144], 'timestamp': '2024-12-17 13:50:01Z', 'trace_id': 'd831696a-8ad7-4778-8ce9-b97ec44efc01', 'correlation_id': 'f4750481-1c18-48c3-9247-2a98d786554b', 'error_uri': 'https://login.microsoftonline.com/error?code=900144'}
以下是请求代码的部分摘抄:
microsoft_token_dict = {"client_id": "<MY CHLIENT IID>",
"code": code,
"grant_type": "authorization_code",
"redirect_uri": "https://127.0.0.1:5000/get_code",
"scope": "XboxLive.signin offline_access"}
microsoft_token_response = post("https://login.microsoftonline.com/consumers/oauth2/v2.0/token",json=dumps(microsoft_token_dict), headers={"Content-Type": "application/x-www-form-urlencoded"})