您好,我正在尝试使用 Graph api(最近更新)获取 Microsoft 团队的频道,如下所示
var settings = {
"async": true,
"crossDomain": true,
"url": "https://graph.microsoft.com/beta/groups/f389913f-b38d-4784-a37c-9ae3259275dc/channels",
"method": "GET",
"headers": {
"authorization": "token`enter code here`",
"cache-control": "no-cache",
"postman-token": "f4e5037c-913a-bc76-10a2-a0adb9064c11"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Run Code Online (Sandbox Code Playgroud)
但我收到以下错误。
{
"error": {
"code": "AccessDenied",
"message": "Failed to execute Skype backend request GetThreadRequest. Request Url: https://apac-client-ss.msg.skype.com/v1/threads/19:88b4b1fa52214b7fbb3fd8d10bd37cea@thread.skype?view=msnp24Equivalent, Request Method: GET,. The server failed to respond correctly. Response Code: Forbidden, Reason: SkypeToken is from a disallowed region.. Response Headers: Pragma: no-cache\r\nContextId: tcid=7407026678545725096,server=EAP010230200016\r\nCache-Control: no-store, must-revalidate, no-cache\r\nDate: Fri, 12 …Run Code Online (Sandbox Code Playgroud) graph azure azure-ad-graph-api microsoft-teams microsoft-graph-api
我正在使用 ms graph api 来获取所有带有附件的消息。除此之外,我需要获取具有 docx/pdf 扩展名的文件。以下是我尝试过的过滤器。
https://graph.microsoft.com/v1.0/me/messages ?$filter=hasAttachments eq true 和 ext eq 'docx'
https://graph.microsoft.com/v1.0/me/messages ?$filter=hasAttachments eq true 和扩展 eq 'docx'
我尝试使用 Microsoft Graph API 创建来宾用户。我使用了该财产UserType。
user.UserType = "Guest";
Run Code Online (Sandbox Code Playgroud)
但回应显示Invalid User principal Name。
我可以在门户中创建相同的用户。
我一直在使用以下代码示例来测试从 Java 应用程序对 Microsoft Graph API 的访问:
https://azure.microsoft.com/en-au/resources/samples/active-directory-java-webapp-openidconnect/
在我的 Azure 门户中,我在 Azure Active Directory 下创建了一个注册应用程序。我已经进入API Access > Required Permissions并添加Microsoft Graph并检查了所有应用程序权限和委派权限。
当我尝试调用示例应用程序的“显示租户中的用户”功能时,我从 Microsoft 登录过程中收到以下错误消息:
AADSTS65005:资源无效。客户端请求访问未在客户端应用程序注册中请求的权限中列出的资源。客户端应用程序 ID:1b350134-84b1-4ca1-a181-03e3699996a1。请求中的资源值: https: //graph.windows.net。资源应用程序 ID:00000002-0000-0000-c000-000000000000。应用程序注册的有效资源列表:00000003-0000-0000-c000-000000000000。
谁能建议如何从这里继续?
active-directory azure azure-ad-graph-api microsoft-graph-api
在天蓝色图中,我有一个用户列表,其中一些可以分配给企业应用程序(我注册的应用程序)。我们如何使用图形 API(使用 Postman)获取特定应用程序的用户?
使用此 API,我无需依赖应用程序即可获得所有用户的列表
https://graph.microsoft.com/v1.0/users
Run Code Online (Sandbox Code Playgroud)
还尝试通过 id 从用户许可中查找有关应用程序的一些信息,但仍然没有成功
POST /users/{id | userPrincipalName}/assignLicense
Run Code Online (Sandbox Code Playgroud)
并从应用程序信息
GET /applications/{id}
Run Code Online (Sandbox Code Playgroud)
我对用户、目录、应用程序的用户、目录、应用程序都有完整的权限堆栈,包括委托用户和应用程序,所以这绝对不是问题。
希望得到您的帮助,谢谢!
我在网上的 sharepoint 中有一个列表。在这个列表中,我有一个 person 字段。
当我调用 API 端点以获取列表中的所有项目时,我会得到人员字段的 LookupId 值。
我试图通过使用 lookupid 的值来获取用户,但它不起作用,因为无法识别 id。
lookupid 是一个 int(例如:21)而不是一个 guid。
人员字段的配置或我对 Microsoft Graph API 的调用中是否缺少某些内容?
api sharepoint sharepoint-online microsoft-graph-sdks microsoft-graph-api
当我me/calendars/[calendar-id]/events使用以下有效负载执行 POST 时。它成功创建了事件,我收到了新事件的 ID:
{
"start": {
"timeZone": "America/Chicago",
"dateTime": "2022-12-23T15:00:00"
},
"end": {
"timeZone": "America/Chicago",
"dateTime": "2022-12-23T18:00:00"
},
"subject": "Please don't delete me!",
"body": {
"contentType": "text",
"content": "I'm just an event in the future, I wonder if I'll send a '@removed' notice?"
}
"isCancelled": false,
"type": "singleInstance"
}
Run Code Online (Sandbox Code Playgroud)
但在那之后不久,我的 webhook 收到了该事件的信息,表明它刚刚被删除:
{
"@odata.type": "#microsoft.graph.event"
"id": [that-event-id]
"@removed": {
"reason": "deleted"
}
}
Run Code Online (Sandbox Code Playgroud)
当我去查看我的 Outlook 日历时,该事件似乎仍然存在,如果我得到它,它isCancelled是错误的。
这只发生在一年多以前或两年后创建的事件中。
我正在尝试使用 MS Graph API 创建 MS Teams 会议。据记载,为了创建会议,应将委派的“OnlineMeetings.ReadWrite”权限分配给 Azure 应用程序。

我分配了这个权限,但我得到了回应:
{'error': {'code': 'Forbidden', 'message': '', 'innerError': {'request-id': 'baa2940f-6b8e-45c1-8ea1-770792266458', 'date': '2021-01-15T10:00:14', 'client-request-id': 'baa2940f-6b8e-45c1-8ea1-770792266458'}}}
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
meeting = {
"startDateTime" : s_date,
"endDateTime" : e_date,
"subject" : subject
}
meeting_response = client.post("/users/{user_id}/onlineMeetings",json.dumps(meeting),headers=
{'Content-Type': 'application/json'})
meeting = json.loads(meeting_response.text)
print(meeting)
Run Code Online (Sandbox Code Playgroud)
我可以使用 Graph Explorer 以同样的方式创建会议

我做错了什么还是MS方面的错误?
python azure-active-directory microsoft-teams microsoft-graph-api
我是 Rails 和 Microsoft Graph/Omniauth 等的完全新手,并且有点卡住了。
我已经按照Microsoft Graph 教程逐字逐句地遵循了https://docs.microsoft.com/en-us/graph/tutorials/ruby Build Ruby on Rails 应用程序。在添加 Azure AD 身份验证实现登录,我开始启动服务器应该重定向到https://login.microsoftonline.com我得到:
OmniAuth::AuthenticityError Forbidden.
当显示上述错误时,我没有被定向到登录我的 URL 是:http://localhost:3000/auth/microsoft_graph_auth。
我正在运行 Ruby 2.7。而不是 2.6.6(如文档中所述)。
有没有人有任何指示和/或建议?
提前致谢!
Application Trace | Framework Trace | Full Trace
omniauth (2.0.1) lib/omniauth/authenticity_token_protection.rb:27:in `deny'
rack-protection (2.1.0) lib/rack/protection/base.rb:54:in `react'
omniauth (2.0.1) lib/omniauth/authenticity_token_protection.rb:18:in `call!'
omniauth (2.0.1) lib/omniauth/authenticity_token_protection.rb:11:in `call'
omniauth (2.0.1) lib/omniauth/strategy.rb:236:in `request_call'
omniauth (2.0.1) lib/omniauth/strategy.rb:192:in `call!'
omniauth (2.0.1) lib/omniauth/strategy.rb:169:in `call'
omniauth (2.0.1) lib/omniauth/builder.rb:45:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack …Run Code Online (Sandbox Code Playgroud) 我想从 Microsoft Todo ( https://to-do.live.com )获取待办事项,但我不知道如何开始。我在网上搜索,但没有找到 REST API 的文档。
有谁知道如何从 MS Todo(以前称为 Wunderlist)访问某些 Todo 列表?Graph API 是一个值得关注的地方吗?我没有 Office 365 帐户。