尝试使用主名使用所有者创建团队,这给出了错误的“未能找到使用用户主名”的用户。但是用户是365帐户的所有者
请求URL https://graph.microsoft.com/v1.0/teams
请求物体
{
"[email protected]": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName": "Team22",
"description": "My Sample Team’s Description",
"members": [
{
"@odata.type": "#microsoft.graph.aadUserConversationMember",
"roles": [
"owner"
],
"[email protected]": "https://graph.microsoft.com/v1.0/users('[email protected]')"
}
]
}
响应代码404
响应预览
{
"error": {
"code": "NotFound",
"message": "Failed to find users with user principal name '[email protected]'",
"innerError": {
"date": "2022-05-13T06:55:15",
"request-id": "9df9a8fa-21cc-4455-b39f-ef1aca1d4b07",
"client-request-id": "24d55bd6-3f77-b808-221e-3f1a7af7dd5a"
}
}
}
Request URLhttps://graph.microsoft.com/v1.0/teams
Request Body
{
"[email protected]": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName": "Team22",
"description": "My Sample Team’s Description",
"members": [
{
"@odata.type": "#microsoft.graph.aadUserConversationMember",
"roles": [
"owner"
],
"[email protected]": "https://graph.microsoft.com/v1.0/users('[email protected]')"
}
]
}
Response Code 404
Response Preview
{
"error": {
"code": "NotFound",
"message": "Failed to find users with user principal name '[email protected]'",
"innerError": {
"date": "2022-05-13T06:55:15",
"request-id": "9df9a8fa-21cc-4455-b39f-ef1aca1d4b07",
"client-request-id": "24d55bd6-3f77-b808-221e-3f1a7af7dd5a"
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下有效载荷对我有用:
参考文档: https://learn.microsoft.com/en-us/graph/graph/papi/team-post?view=graph=graph-rest-rest-1.0&amp.amp@amp@amp@amp@; tabs = http #example-9-application-permissions-used-user-user-principal-name
The following payload worked for me:
Ref Doc: https://learn.microsoft.com/en-us/graph/api/team-post?view=graph-rest-1.0&tabs=http#example-9-application-permissions-using-user-principal-name