Table of contents
Collapse the table of content
Expand the table of content

WebAPIHelper.RegisterWebAPIService Method

SharePoint Dev Documents|Last Updated: 5/20/2017
1 Contributor

This method needs to be called from a code behind of the SharePoint app startup page (default.aspx). It registers the calling SharePoint app by calling a specific "Register" api in your WebAPI service. Note: Given that method is async you'll need to add the Async="true" page directive to the page that uses this method.

Assembly: OfficeDevPnP.Core.dll


public static void RegisterWebAPIService(this Page page, String apiRequest, Uri serviceEndPoint)



  Type: System.Web.UI.Page
  The page object, needed to insert the services token cookie and read the querystring


  Type: System.String
  Route to the "Register" API

(optional) serviceEndPoint

  Type: System.Uri
  Optional Uri to the WebAPI service endpoint. If null then the assumption is taken that the WebAPI is hosted together with the page making this call

Return Value

Type: void

See also

© 2018 Microsoft