0
votes

I'm trying to use Office Graph with Graph Query Language (GQL) and SharePoint Online Search as per this MSDN article: https://msdn.microsoft.com/en-us/office/office365/howto/query-office-graph-using-gql-with-search-rest-api#available-action-types

For my office 365 environment, I can get data for myself using ACTOR(ME) in the GQL and even for another user using ActorID as ACTOR(21223), where 21223 is an actor ID for a user (for example).

In this case i know Actor ID before hand, but how do I get the ActorID for a given office 365 user? Is there a way to get actor Ids for all office 365users?

1

1 Answers

1
votes

Looks like I've found how to do it.

It can be done by perfroming search a search against SharePoint User profile, by user name or email and reading the property "UserName,DocId" from the people search. This is as per the comments by the author of this blog post (http://www.techmikael.com/2014/10/office-graph-support-in-sharepoint-2013.html?showComment=1470189211109#c659048088948213635.

This will be a query to get the ActorID for a user with username carls:

_api/search/query?Querytext='Username:carls'&SourceId='b09a7990-05ea-4af9-81ef-edfab16c4e31'&SelectProperties='UserName,DocId'