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

WebAPIHelper.GetClientContext Method

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

Creates a ClientContext token for the incoming WebAPI request. This is done by - looking up the servicesToken - extracting the cacheKey - get the AccessToken from cache. If the AccessToken is expired a new one is requested using the refresh token - creation of a ClientContext object based on the AccessToken

Assembly: OfficeDevPnP.Core.dll


public static ClientContext GetClientContext(HttpControllerContext httpControllerContext)



  Type: System.Web.Http.Controllers.HttpControllerContext
  Information about the HTTP request that reached the WebAPI controller

Return Value

Type: ClientContext
A valid ClientContext object

See also

© 2018 Microsoft