Microsoft Security | Microsoft Graph
An API that connects multiple Microsoft services, enabling data access and automation across platforms
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Trying to filter mail in PowerShell Script with Graph API. Getting bad request can someone help
@{'Authorization' = "Bearer $token"; "Content-Type" = "application/json" }
$method = "GET"
$uri = "https://graph.microsoft.com/v1.0/users/{user-id}}messages?$filter=from/emailAddress/address eq '******@gmail.com'"
An API that connects multiple Microsoft services, enabling data access and automation across platforms
When you are using $filter in PowerShell it will take it as Variable, so you need to use it like `$filter in above API.
Please refer to this similar case for more details.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.