No output for Invoke-MgGraphRequest for user presence
Hi All!
I am experiencing some odd behaviour with a Invoke-MgGraphRequest and an Azure Runbook and could do with a nudge in the right direction.
I am trying to report on my Teams presence using GraphAPI. When I use the following code, it works, presence returned:
Invoke-MgGraphRequest -method GET -Uri “https://graph.microsoft.com/v1.0/communications/presences/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”
But, When I try and assign this output to a variable (so it can be passed to a SharePoint list) I don’t get any output:
$returned=Invoke-MgGraphRequest -method GET -Uri “https://graph.microsoft.com/v1.0/communications/presences/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”
$returned.value | ForEach-Object {$_.availability}
Am I doing something wrong, or is this expected behaviour?
Hi All! I am experiencing some odd behaviour with a Invoke-MgGraphRequest and an Azure Runbook and could do with a nudge in the right direction.I am trying to report on my Teams presence using GraphAPI. When I use the following code, it works, presence returned: Invoke-MgGraphRequest -method GET -Uri “https://graph.microsoft.com/v1.0/communications/presences/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx” But, When I try and assign this output to a variable (so it can be passed to a SharePoint list) I don’t get any output:$returned=Invoke-MgGraphRequest -method GET -Uri “https://graph.microsoft.com/v1.0/communications/presences/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”
$returned.value | ForEach-Object {$_.availability}Am I doing something wrong, or is this expected behaviour? Read More