I am trying to make a Get Request to the Microsoft Graph API for a specific user's email within my organization. Therefore, I have created the following query, to return the displayName, scoredEmailAddresses, and userPrincipalName for user "jane doe", whose userPrincipalName endsWith @something.com (see below). However, when I run this query in Graph Explorer, I receive the error below. Can any advise how I can fix this query?
QUERY:
https://graph.microsoft.com/v1.0/me/people?$search="Jane Doe"&$select=displayName,scoredEmailAddresses,userPrincipalName&$count=true&$filter=endsWith(userPrincipalName, '@something.com')
ERROR:
{
"error": {
"code": "ErrorInvalidUrlQueryFilter",
"message": "The query filter contains one or more invalid nodes.",
"innerError": {
"date": "2022-07-26T14:16:45",
}
}
}