Forum Discussion
Petercheungtsrd
Sep 25, 2023Copper Contributor
Read Mail via Powershell
I want to develop an automatic task for creating an LDAP account. i tried in developer.microsoft.com is ok return the body https://graph.microsoft.com/v1.0/me/messages?$search="subject:\"New+...
MrMattiPants
Aug 06, 2024Copper Contributor
I don't believe you need the Double-Quotes or the Backslash that proceeds them, in the "Search" Parameter.
Try it as follows.
Get-MgUserMessage -UserId $userId -Search '"subject:New Onboarding"'