Forum Discussion
[teams meeting] How to change guest user role ?
Hi,i created a meeting where everyone was the presenter by default,add two users to the meeting (one for the organization and one for the guest)
Now, i want to set the user of the organization as a attendee, and the guest as the presenter
Here is my code, after which everyone becomes a attendee..
var onlineMeeting = new OnlineMeeting
{
AllowedPresenters = OnlineMeetingPresenters.RoleIsPresenter,
Participants = new MeetingParticipants()
{
Attendees = new List<MeetingParticipantInfo>()
}
};
var attendeeList = onlineMeeting.Participants.Attendees.ToList();
attendeeList.Add(new MeetingParticipantInfo
{
Role = OnlineMeetingRole.Attendee,
Identity = new IdentitySet { User = new Identity { Id = "organization user id" } }
});
onlineMeeting.Participants.Attendees = attendeeList;
return await _GraphClient.Users["user id"].OnlineMeetings["meeting id"]
.Request()
.UpdateAsync(onlineMeeting);
Guest users directly can't be made as presenters without inviting them as Guests into the organization.
Refer to documentation plan-for-teams-live-events
For a guest to present in a meeting, do the following tasks:-
Add the user as a guest to a team.
- Have the user accept the guest invitation and join the team.
Schedule the live meeting and add the guest to your event group.
Thanks,
Nivedipa
---------------------------------------------------------------------------------------
If the response is helpful, please click "Mark as Best Response" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
-
8 Replies
- ChetanSharma-msft
Microsoft
We will check on it from our end and let you know.- Nivedipa-MSFT
Microsoft
liao_ben - Could you please try to set Role = OnlineMeetingRole.Presenter for guest user and check again.
Ref Doc: https://docs.microsoft.com/en-us/graph/api/resources/meetingparticipants?view=graph-rest-1.0- liao_benCopper Contributor
Nivedipa-MSFT - I try to set up guest Role = OnlineMeetingRole Presenter, but i can't get guest user id.
//guest user attendeeList.Add(new MeetingParticipantInfo { Role = OnlineMeetingRole.Presenter, Identity = new IdentitySet { User = new Identity { Id = "guest user id" } } //guest user id ?? });