I am having issues hiding chat with graph API.
The API call I am using is https://learn.microsoft.com/en-gb/graph/api/chat-hideforuser?WT.mc_id=M365-MVP-5001530&view=graph-rest-1.0&tabs=http
I am supplying the request body as following:
{
user: {
id: userId
},
}
The service principal I am using has delegated Chat.ReadWrite Permission, and the user Id being used in the request body is same as the caller user.
Still, I keep getting the error Bad Request:
{"error":{"code":"BadRequest","message":"The user for whom the chat should be hidden must be specified.","innerError":{"date":"2024-04-07T05:08:48","request-id":"667dab50-60a3-4b58-8103-cd210e69975f","client-request-id":"667dab50-60a3-4b58-8103-cd210e69975f"}}}
Please help me understand what am I doing wrong?
Regards,
Akash Mudgal