SPO graph API is deprecated?

Silver Contributor

We've been using a few simple web service calls like this for years:




But now it is no longer working, error message I get is as follows:


<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
-1, Microsoft.Office.Server.Search.REST.SearchServiceException
<m:message xml:lang="en-US">SPO graph API is deprecated.</m:message>

How do I now call this type of WS from SharePoint Online?  Which endpoint should we be using instead?

7 Replies

Is this not due to new graph api microsoft graph instead of office graph

Yes, problem is I dont have developer resources to do this. This is just a simple script in SharePoint Online page, what I am seeing is that I now is I am unable to do these simple things directly from SharePoint Online page?

Graph can't be called from SPO?
So that will get me working again till 8/31

But the same thing remains, is it physically impossible to query the Graph API directly from SharePoint Online (as current logged in user)?


Hi @Brent Ellis

I don't think that this is the case.

  • By June 19, 2017, the APIs stop working without the parameter.
  • The APIs stop working completely on August 31, 2017.

With APIs, I think, the article is referring to the search APIs. The Graph APIs remain available.


I must agree the document isn't very clear.


You could use the graph explorer to create your query.. 



MS Graph can be called from SPO page, but as you say, it has some Authorization implications.
When working with the new spfx framework, and since some weeks ago, there's a HttpGraphClient to call MS Graph inside an spfx webpart without dealing with Auth.
With classic pages, is a bit more complicated, but you can use the same service that is using the HttpGraphClient to get a token, and then call the MS Graph API, as it's described in this article: http://www.vrdmn.com/2017/06/access-microsoft-graph-from-classic.html
However, all of this is still in Preview, so it's only available in Tenants with the Preview feature enable. Also, I'm not sure if all the current Office Graph queries are available with MS Graph API...