I need to add co-organizer in teams meeting through graph api

Lenyka Online 0 Reputation points
2023-02-25T20:57:56.74+00:00

I am using the https://graph.microsoft.com/v1.0/me/events/ endpoint
This is my json code:

{
    'subject': 'Test meeting',
    'body': {
        'contentType': 'HTML',
        'content': 'Group code: Hello'
    },
    'start': {
        'dateTime': '2023-02-25T12:30',
        'timeZone': 'Europe/Sofia'
    },
    'end': {
        'dateTime': '2023-02-25T13:30',
        'timeZone': 'Europe/Sofia'
    },
    'attendees': [
        {
            'status': {
                'response': 'accepted',
                'time': '0001-01-01T00:00:00Z'
            },
            'emailAddress': {
                'address': '
                'name': 'name'
            },
            'type': 'required'
        }
    ],
    'organizer': {
        'emailAddress': {
            'address': 'name@example.com',
            'name': 'Organizer'
        }
    },
    'allowNewTimeProposals': true,
    'isOnlineMeeting': true,
    'onlineMeetingProvider': 'teamsForBusiness'
}

It successfully makes a meeting and adding the participants to it, but I need to assign the participants a role 'co-organizers'. Please help!

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,075 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,592 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,846 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Shivam Dhiman 5,946 Reputation points
    2023-02-27T15:47:11.4966667+00:00

    Hi @Lenyka Online

    To create Online meeting with Coorganizer, use this
    POST https://graph.microsoft.com/v1.0/me/onlineMeetings/createOrGet Graph API endpoint. User participants property to add coorganizer role. You must use the Prefer: include-unknown-enum-members request header to add role value.
    Please refer to the below sample screenshot:

    coorganizer

    Please refer to this documentation for more details.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.


  2. Jim Johnson 0 Reputation points
    2023-08-24T02:06:35.6633333+00:00

    So I tried the set up, but the response shows unknownFutureValue -- what have I done wrong?

    REQUEST

      "participants": {
          "attendees":[
              {
                "upn": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                "role": "coorganizer",
                "identity": {
                    "user": {
                        "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                        "displayName": "Display Name",
                        "identityProvider": "AAD"
                    }
                }
              }
          ]
          }
    

    RESPONSE

            "attendees": [
                {
                    "upn": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "role": "unknownFutureValue",
                    "identity": {
                        "application": null,
                        "device": null,
                        "user": {
                            "id": "xxxxxxxxxxxxxxxxxxxxxxxxx",
                            "displayName": null,
                            "tenantId": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
                            "identityProvider": "AAD"
                        }
                    }
                }
            ]