OK, I know now what is wrong, If you dynamicly add attendees, the data must be OK. Because I am switching between 1,2 and 3 attendees that can be presenter. I must construct 3 different creates and 3 different patches.
Your TeamsMeeting will fail for guests if one of your attendees looks like this in the output:
"attendees": [
{
"upn": "",
"role": null,
"identity": {
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "",
"displayName": null,
"tenantId": null,
"identityProvider": "MSA"
}
}
}