Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
628 views
in Technique[技术] by (71.8m points)

c# - Microsoft Graph API assign participant role to online meeting

I'm using graph API to create an online meeting and everything works fine as expected, I have the meeting created and with the web URL and phone audio information returned properly. However, now I'm trying to see if I can pre-assign a participant role to whoever person might join, and I can't seem to find anything from the documentation.

I've tried to add attendee with the following code during the creation of the meeting, but it can't seem to recognize or match with either the email or full name of the when he/she joins the meeting.

        var mpi = new MeetingParticipantInfo()
        {
            Identity = new IdentitySet
            {
                User = new Identity
                {
                    Id = Guid.NewGuid().ToString(),
                    DisplayName = displayName
                }
            },
            Upn = email,
            Role = role
        };

Is there anything I'm missing or is the pre-assign role even possible programmatically in Teams meeting?

question from:https://stackoverflow.com/questions/65896826/microsoft-graph-api-assign-participant-role-to-online-meeting

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Not sure about Participant role.

Under Participant section - like you mentioned.

https://docs.microsoft.com/en-us/graph/api/resources/meetingparticipants?view=graph-rest-1.0

There are 2 categories

  1. attendees
  2. organizer

You have two roles under attendees - Presenter, attendees.

To add a attendees to meeting :

Use PATCH

https://graph.microsoft.com/v1.0/me/onlinemeetings/<MEETING ID>

You will be able to get the meeting when you had created the online meeting invite.

For Attendee Role:

{"participants":{"attendees":[{"identity":{"@odata.type":"#microsoft.graph.identitySet"},"upn":"<UPN>","role":"attendee"}]}}

For Presenter Role :

{"participants":{"attendees":[{"identity":{"@odata.type":"#microsoft.graph.identitySet"},"upn":"<UPN>","role":"presenter"}]}}

Organizer

As far as I have You will not be able to change/add organizer when you use the 'me' endpoint.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...