-
Notifications
You must be signed in to change notification settings - Fork 437
Open
Description
The above query that contains a ' symbol in the subject filter:
query = mailbox.new_query().on_attribute('subject').contains("who's the best?")
Fails with:
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0/users/.../messages?%24top=1&%24filter=contains%28subject%2C+%27who%27s+the+best%3F%27%29 | Error Message: Invalid filter clause: ')' or ',' expected at position 23 in 'contains(subject, 'who's the best?')'.
To properly escape single quotes in ms graph, they must be entered twice ( ' --> '' ):
query = mailbox.new_query().on_attribute('subject').contains("who''s the best?")
I'm unsure if this issue includes other characters that also need to be escaped.
Metadata
Metadata
Assignees
Labels
No labels