MS Graph CalendarView BadRequest

Zeljko Zaric 1 Reputation point

HI Together

Can somone tell me why am i getting bad request using this query in powershell script.Authentication with token is working fine and some other query are working with same authentication method.

Same query is working in graph explorer.

ErrorMessage : Invoke-RestMethod : The remote server returned an error: (400) Bad Request.

Thanks in advance for your help.

$query = ""
$appointments = (Invoke-RestMethod -Headers @{Authorization = "Bearer $($AccessToken)"} -Uri $query -Method Get).Value

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,798 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Zeljko Zaric 1 Reputation point

    I found the soulution. users in https query was missing.


    0 comments No comments