代码之家  ›  专栏  ›  技术社区  ›  umasankar

如何使用图形api在azure active directory中添加外部用户

  •  1
  • umasankar  · 技术社区  · 7 年前

    enter image description here

    enter image description here

    但我尝试在azure active directory中使用Rest api添加外部用户。

    enter image description here

    我正在签入microsoft文档 create invitation

    {
        "error": {
            "code": "BadRequest",
            "message": "Invalid version",
            "innerError": {
                "request-id": "464934b2-8915-418e-8761-87778059692e",
                "date": "2017-09-19T13:30:26"
            }
        }
    }
    

    我试图在url中创建租户id,但它返回了

    {
        "error": {
            "code": "BadRequest",
            "message": "Resource not found for the segment 'invites'.",
            "innerError": {
                "request-id": "2d940a4e-4ffe-4a3f-91e8-b94cb3536a59",
                "date": "2017-09-19T13:13:49"
            }
        }
    }
    

    我也登记入住 https://www.eliostruyf.com/adding-guests-to-an-office-365-group-via-the-microsoft-graph-api/

    这是show response返回创建类型邀请,但我没有得到预期的结果。

    我需要添加现有用户。在广告中有或没有邀请。任何人都知道分享信息。

    提前谢谢。

    1 回复  |  直到 6 年前
        1
  •  1
  •   Ortund    3 年前

    终点是 https://graph.microsoft.com/beta/invitations :

    Invitation - Postman

    当获得 ,您还应该使用一个范围,如 User.Invite.All .

    有关API的更多信息: https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/invitation_post

    由于上述链接已断开,请使用此链接了解详细信息:
    https://docs.microsoft.com/en-us/graph/api/invitation-post?view=graph-rest-1.0&tabs=csharp