I have a custom web part which runs a KeywordQuery
to find all tasks across all site collections assigned to the current user.
The query itself looks like this:
"ContentClass:'STS_ListItem_Tasks' AND AssignedTo:'" + web.CurrentUser.Name + "' NOT Status:'Complete'"
The property web.CurrentUser.Name
gives me the displayname, however some site collections uses Claims and the displayname contains something like i:05.t|asdf saml v3|[email protected]
which the search engine doesn't recognize and then it returns 0 results.
Is there some other keywords or unique properties I can use instead of AssignedTo which will guarantee that tasks for current user will always be found regardless of name - like Sid, or Email?
{User.Name}
token works in 2010. I have a feeling it was new in 2013, but it doesn't hurt to give it a try|
is used as a separator in the claimi:05.t|asdf saml v3|[email protected]
, see if this question helps you sharepoint.stackexchange.com/questions/121394/…