更新时间:2022-03-10 23:41:43
I discovered this link in Microsoft Docs. In my case, the issue was a folder with a single quote, which was not being properly escaped. Since that folder was being used in the Scope property of the AdvacedSearch method, it was throwing the exception. Maybe it should help you to encounter what is missing in your code.