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 | Development
Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Shivam Dhiman 6,081 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"
                        }
                    }
                }
            ]
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.