Sep 01 2022 09:43 AM - edited Sep 02 2022 07:49 AM
$URL = $betaGraphURL+"/users/"+$DATA[5]+"/onlineMeetings"
$OLMeetingBODY = @{
"startDateTime" = $finalCLASSstart
"endDateTime" = $finalCLASSend
"subject" = $classTITLE
"broadcastSettings" = @{
"allowedAudience" = "everyone"
"isQuestionAndAnswerEnabled" = $true
}
}
$OLMeeting = invoke-restmethod -head $d_HEAD -uri $URL -method post -body ($OLMeetingBODY|convertto-json)
Hello community!
Line 6 is giving me grief. It works without any 'broadcastSettings' enabled. I know it has to be something quick an simple. But for the life of me, I just cannot seem to get it to work.
$DATA[5] = Users Object ID
$d_HEAD = Delegation header
Any guidance would be ever so appreciated!
~WM
Sep 01 2022 04:00 PM
Solution
This is more a Graph question than a PowerShell question since there's nothing wrong with your example from the PowerShell perspective.
I tested your example (using my own variable values since we can't see yours) and it parsed just fine:
Looking at the second example in the reference documentation, I can't help but wonder if the fact you're missing the "isBroadcast = $true" isn't causing an issue. Perhaps you need this directive to go along with the settings you have in broadcastSettings - dunno, I'm just guessing as this is squarely in the Graph domain (not PowerShell.)
Cheers,
Lain
Sep 02 2022 07:48 AM