我似乎无法在 $search 中使用 AND。下面只返回邮箱中的所有内容。
我做错了什么?
$api = 'https://graph.microsoft.com/V1.0/users/[email protected]/messages?$search="subject:XYZ" AND "from:[email protected]"'
$messages = Invoke-RestMethod -Headers @{Authorization = "Bearer $($ConnectGraph.access_token)"} -ContentType application/json -Uri $api -Method Get