【发布时间】:2022-06-14 19:04:34
【问题描述】:
我是新来使用这种类型的尝试通过点击 python 烧瓶服务器在我的组织中获取用户详细信息 网址:https://graph.microsoft.com/v1.0/me/ 请求标头: “内容类型”:“应用程序/json”,“授权”:accessToken 回应:
访问被拒绝
您请求的页面已被屏蔽
请问有什么建议吗?从图形 URL 中,能够从 python 代码库获得响应,我们得到了拒绝访问。 python中的方法: def get_user_details_(access_token: str): url = "https://graph.microsoft.com/v1.0/me" headers = {'Content-Type': "应用程序/json", “授权”:access_token } 响应 = requests.get(url, headers=headers, verify=False) 打印(“响应****”,response.text) response = response.json() if response else {} 返回响应
【问题讨论】:
-
请提供足够的代码,以便其他人更好地理解或重现问题。
标签: python azure accessibility graph-explorer