Office Graph: The Brain of Office 365

Last month I presented a session on “Office Graph” at Microsoft’s Developer Tech Refresh, in Lisbon. At the beginning of a presentation, I usually ask one or two questions to the audience to get a feeling of how much they know about the subject and so that I can adjust the technical depth of the content I’m presenting.

This time was no different and I asked how many of the attendees knew what is the Office Graph and Office Delve. I was surprised that only a few hands were lifted, and that so many of the attendees had no clue of what I was about to present. I decided to start at the beginning and I think it went great. So I figured it would be a good idea to write an article about Office Graph, for beginners.

What’s a Graph?

Office GraphStarting at the beginning means explaining what a graph is. A graph is mathematical concept which is used in computer science as a data structure, composed of nodes connected by edges. Each node represents some sort of entity, and each edge a relationship between two of those entities. Each edge may also have a direction and can store data. Social networks, such as Facebook, LinkedIn or Yammer, use this kind of data structure to represent the relationships between the people and the contents stored in it.

What is the Office Graph?

It’s easier to explain what the Office Graph is by describing what it does. Let’s focus on a person which uses Office 365 in her day-to-day activities while working for her company. Each action this person performs sends a signal to the Office Graph which, after being processed, might create a relationship between its nodes.

A signal is sent to the Office Graph when:
• I open a document in SharePoint Online or One Drive for Business;

• A colleague shares a document with me;

• A colleague sends an email to me;

• A colleague presents a PowerPoint slide deck to me;

• I perform a social gesture (such as pressing the “like” button for a content on Yammer)

The Office Graph can also retrieve information about my organization by tapping into my company’s Azure Active Directory and my User Profile in SharePoint Online. From this information, it builds an organizational map of my company. It knows who my manager is and who reports to me.

Additionally, the Office Graph uses intelligence mechanisms (machine learning) to automatically identify who I’m actively working with, based on who shares information with me and the email messages I send to and receive from other users in my organization. For instance, if I receive frequent emails from John and reply immediately, the Office Graph will infer that I work closely with John. On the other hand, if I receive emails from Jane and I don’t reply or take longer to do so, it will infer that the work relationship is not so close.

OFFICE GRAPH

The Office Graph does all this for me and for all the colleagues that work in my organization, provided they also use the same Office 365 tenant. That’s why the Office Graph is also known as the brain of Office 365.

What’s stored in the Office Graph?

Currently, the nodes in the Office Graph are Documents and People but soon there will be new types of nodes. My profile will live in the Graph, the Groups will also have their own nodes as will some of the actions performed by users.

At Build and Ignite events, Microsoft shared some impressive statistics that can give us a glimpse of the scale of the Office Graph:

• Office 365 stores more than 70 PetaBytes (that’s 78.812.993.478.983.680 bytes!) of data among its tenants;

• More than 60 Billion email attachments were sent using Exchange Online;

• 850 Million meetings are scheduled each month using Exchange Online;

• Office Graph has more than 4 Trillion nodes and 8 Billion relationships between nodes;

• 25% of all relationships are between people.

This kind of scale is only possible in the cloud, where computational power and storage capacity are almost unlimited. This is also why the Office Graph won’t be available on premises. You can, however, connect your on premises SharePoint Server 2016 farm to your Office 365 tenant using a hybrid approach, and leverage it on your organization. But that is out of scope for this article.

Is it safe?

One important question that comes up frequently when talking about the Office Graph is related to privacy. Not all the actions are public, some are private:

• Viewing a document is a private action and it won’t be shared with other users. The number of times I open a document is used to calculate how important that document is to me, and how strong my relationship with the author of that document is. However, that view count is not shared with anyone.
• Sending emails is also a private action, only available to the sender and receiver of the email message, as well as any attachments of that message.

Regarding security, Office Graph respects the access permissions that were set on each content, whether it’s stored in SharePoint Online, One Drive for Business or Exchange Online. Each user will only be able to see the contents she has access to.

What is Office Delve?

Office Delve is a web application, recently introduced to the Office 365 family of applications. It was announced at SPC (SharePoint Conference) in 2014 and, at the time, it was knows as Oslo Experience. It started as an internal demo of how to present the contents stored in the Office Graph and it was built by Microsoft’s Oslo team, once a part of FAST.

Office Delve is described as a Search and Discovery experience because, on one hand, it allows you to perform search for people and documents by typing terms in a search box. But, on the other hand, it will present you the contents that matter to you without the need to search for them. This is its main selling point, and it makes Office Delve work especially well as Office 365’s personalized homepage.

The Home Page

If you have an Office 365 subscription, you can access Office Delve by opening the Office 365 menu in the waffle button and clicking the Delve icon. You’ll be presented with the Home page which shows the contents that the Office Graph “thinks” might interest you. These can be contents you have edited yourself, that someone shared with you or that a colleague you regularly interact with has edited.

DELVE

On the left side, Delve will present the list of people you work with. They’re always users that belong to the same Office 365 tenant, which usually means they work at the same company you do. This information is automatically calculated based on the exchanged emails, and shared, viewed or edited documents.

Each content is presented in the form of a card with the following information:
• The reason that caused the card to be shown in the page

• Content title

• Image extracted from the content

• Content type (or application associated with the content)

• Content location

• Icons to share the content by email, to manage the content permissions and to start a Yammer conversation about the content

• Button to add the content to a Board

The Me Page

The Me page shows information that is directly related to you. It’s composed of two subpages: the Activity page and the Profile page:

• The Activity page presents contents you have edited yourself or that were explicitly shared with you. In this page you can also access additional information about yourself through the Trending Around Me page, which shows people and content that Office Graph automatically inferred that are related to you based on usage patterns.

• The Profile page presents an aggregated view of your user profile, with information retrieved from your organization’s Active Directory and Office 365 user profile. The Organization diagram is automatically calculated based on the value of the Manager property of each user’s profile.

Boards

In Delve, a Board is a group of content cards, aggregated around a tag. It’s a concept somewhat similar to that of Pinterest, with some small differences.

Boards are always public, which means that anyone can find a board you created just by searching for the corresponding tag, and even add their own contents to it. However, since everything in Delve is based on Search, each user will only be allowed to see the contents that they have access to. This means that two users that access a specific board will likely see different sets of content cards.

Querying the Office Graph

Given all the content stored in the Office Graph, it is only natural that developers want to query it and use this wealth of knowledge in their own business applications. Currently, there are two ways to query the Office Graph:
• Using the Graph Query Language (GQL)
• Using the Office 365 Unified API

Graph Query Language

The Graph Query Language (GQL) was developed to be used by Office Delve and it works on top of the Search REST API. It uses a syntax similar to FQL (FAST Query Language) which should come as no surprise, since both were created by the same people.

Before diving into GQL, I must discuss a few important concepts:

• In Office Graph, every node represents an entity like a document or a person, and is identified by a unique number;

• Every edge represents an action between two nodes and has a direction, i.e., a starting node (called actor) and an ending node (called object);

• An edge can also have additional information, like a timestamp and a weight value.

To retrieve all the items modified by a specific user, you would use the following GQL query:
ACTOR(1234, action:1003)

In the example above, “1234” is the identifier of the user and “1003” is the code for the “modified by” action.

To query the Office Graph you must inject your GQL query in a Search request, using the Properties parameter as shown below:

https://<tenant URL>/_api/search/query?QueryText=’*’
&Properties=’GraphQuery:actor(1234,action:1033)’
&SelectProperties=’DocId,Title’

A lot more queries can be performed using GQL so, if you’re interested in learning more, please visit this web site: https://msdn.microsoft.com/en-us/office/office365/howto/query-Office-graph-using-gql-with-search-rest-api.

Office 365 Unified API

The new Unified API exposes all the Office 365 APIs through a single endpoint, offering a more streamlined and consistent experience to developers. Using a single authentication flow also makes it much simpler than authenticating to each Office 365 API separately.

The Unified API can be used for CRUD (Create, Read, Update and Delete) operations on multiple entities across the Office 365 platform, from Users and Groups to Files and Mail and to the Office Graph.

Currently, the Unified API is still in Preview and some of the operations are not yet available, but you can already use it with your own Office 365 tenant using an endpoint such as:
https://graph.microsoft.com/beta/<tenant name>

Besides actions related to Users, Groups or Files, the Unified API provides access to two very important Office Graph actions: TrendingAround and WorkingWith.

The TrendingAround action returns all the items related to a specific user, as inferred by the Office Graph, and can be used like this:
https://graph.microsoft.com/beta/me/trendingAround

The WorkingWith action returns the colleagues that actively collaborate with a specific user, as inferred by the Office Graph, and can be used like this:
https://graph.microsoft.com/beta/me/workingWith

For more information on how to use the Unified API, check these two links:
http://dev.office.com/unifiedAPIs

https://msdn.microsoft.com/en-us/office/office365/howto/office-365-unified-api-overview

What’s coming?

Office Graph and Office Delve are still very young technologies with a lot to grow and, because they are so intimately related, they will grow together.

Office Graph’s roadmap includes:

• The new Unified REST API, currently in Preview;

• Client SDKs to make it easier to integrate and authenticate with the new API;

• Entity extensibility which will allow developers to define custom entities that can be stored in the graph, such as business-specific entities;

• Connectors to allow other systems to send signals to the Office Graph, such as Dynamics CRM, Salesforce or Trello;

• Custom Analytics;

• Notifications whenever certain actions are performed on the graph;

• Licensing for the usage of the Office Graph.

Regarding Delve, you can expect:

• A new richer profile page;

• A new area for Office 365 Groups with analytics;

• A new area dedicated to the Organization with analytics.

Learn More

If you want to learn more about the Office Graph here are a few useful links:

Learn about Office Graph
http://dev.office.com/officegraph

Create apps with Office 365 API and the Unified API
https://msdn.microsoft.com/en-us/office/office365/api/api-catalog

Test the Office Graph Preview API
http://msdn.microsoft.com/en-us/library/office/dn783218(v=office.15).aspx

André Vala

About the author André Vala:

Andre Vala 1_188x 208 André Vala is a SharePoint Solutions Architect at |create|it|, a Microsoft Partner company which specializes in Systems Integration, Business Productivity and Cloud Solutions, using Microsoft technologies such as BizTalk, SharePoint and Azure. André is a MCTS and MCSD for Microsoft SharePoint Server, having worked with SharePoint for the last 9 years on projects that range from Corporate Intranets and Extranets to large Internet Portals. André has been an invited speaker in several Microsoft events such as TechDays and DevDays in Lisbon, Road To SharePoint 2010, and community events such as Portuguese SharePoint User Group meetings. He was also a speaker at the European SharePoint Conference in 2011, a member of the Programme Team for European SharePoint Conference 2014 and is one of the founding members of the Portuguese SharePoint User Group (SPUG PT). André has published a few technical articles focused on SharePoint for the Portuguese magazines “Programar” and “PC Guia” and is the author of the bloghttp://blogit.create.pt/andrevala.

European SharePoint Conference 2015 takes places in Stockholm Sweeden from 9-12 November 2015. View Programme>>

 

Share this on...

Rate this Post:

Share:

Topics:

Office Graph