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

AuthenticationManager.GetAppOnlyAuthenticatedContext Method

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

Returns an app only ClientContext object

Namespace:OfficeDevPnP.Core
Assembly: OfficeDevPnP.Core.dll

Syntax

public ClientContext GetAppOnlyAuthenticatedContext(String siteUrl, String appId, String appSecret, AzureEnvironment environment = 0)

Parameters

siteUrl

  Type: System.String
  Site for which the ClientContext object will be instantiated

appId

  Type: System.String
  Application ID which is requesting the ClientContext object

appSecret

  Type: System.String
  Application secret of the Application which is requesting the ClientContext object

(optional) environment

  Type: OfficeDevPnP.Core.AzureEnvironment
  SharePoint environment being used

Return Value

Type: ClientContext
ClientContext to be used by CSOM code

See also

© 2018 Microsoft