找不到细分用户的资源-应用令牌 [英] Resource not found for the segment user - Application Token

查看:48
本文介绍了找不到细分用户的资源-应用令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够进行身份验证并获得使用Microsoft Graph API的应用程序令牌.我已经将所有委派和管理员权限设置为可以访问用户.我还使用了图形资源管理器来验证我需要什么权限: https://developer.microsoft.com/zh-CN/graph/graph-explorer#

I am able to authenticate and get an application token to use the Microsoft Graph API. I have set all of the delegated and admin permissions to have access to the users. I have also used the graph explorer to verify what permissions I need: https://developer.microsoft.com/en-us/graph/graph-explorer#

我使用他们的

I verified my user GUID (my ID) through Azure AD as well as the Graph Explorer using their https://graph.microsoft.com/v1.0/me/ call while signed in. Given I'm using the application token so I must specify a user (see below).

这就是我要传递的内容

GET https://graph.microsoft.com/v1.0/user/{my GUID from Azure AD}
Authorization: bearer {myAccessToken}
Content-Type: application/json

我怀疑这是语法问题或权限问题.

I suspect it's a syntax issue or a permissions issue.

推荐答案

URL应为:

https://graph.microsoft.com/v1.0/users/{GUID}

您应该发送以下内容,而不是Content-Type标头:

And you instead of a Content-Type header, you should send a:

Accept: application/json

这篇关于找不到细分用户的资源-应用令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆