Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Connecting your application to SharePoint

Updated on March 14, 2022

Ensure that your SharePoint Online integration component works correctly by configuring your SharePoint environment and Pega Platform rules that ensure successful SharePoint authentication and run-time processing of the component data pages.

Performing preparatory tasks for integrating SharePoint

Prepare your SharePoint environment for integration with Pega Platform by creating an add-in app for a SharePoint site.

After you add this app, a Pega application can perform actions on SharePoint entities, such as lists, list items, fields, files, or folders.
Before you begin: Ensure that you have a SharePoint site to which you have administrative access.
  1. Create and register an app for your SharePoint site.
    For instructions about app registration, see the Microsoft SharePoint documentation: Register SharePoint Add-ins.
    Remember: Set the Redirect URI to match your Pega app. Do not change the Redirect URI afterward.
  2. Note and copy the client ID and client secret for your SharePoint app.
    Note: You need the client ID and client secret to correctly configure the rules from the Pega SharePoint Online integration component.
  3. Retrieve the app registration information, and then modify the app permissions to allow creating and modifying lists.
    For more information on retrieving the app details and modifying the permissions, see the Microsoft SharePoint documentation:
    For example: The following code snippet illustrates a sample Permission Request XML that accordingly modifies the app permissions:
    <AppPrincipal>
           <RemoteWebApplication ClientId="clientID" />
    </AppPrincipal>
    <AppPermissionRequests>
           <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="Write"/>
           <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Write"/>
           <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web/list" Right="Write"/>
           <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="Write"/>
    </AppPermissionRequests>
    
  4. Submit your changes and confirm the new app permissions.

Configuring the SharePoint Online component

Make your Pega application ready for integration with SharePoint Online by configuring a set of rules from the SharePoint Online component.

    Configuring the SharePoint URL and site details

  1. In Dev Studio, find and open the SPOnlineSettings data transform.
    Note: Pega Platform uses the configuration details from this data transform for run-time processing of data pages that correspond to various SharePoint APIs.
  2. Click Save as, and then click Create and open.
  3. On the Definition tab, in the Source column for the .SiteURL property row, replace <<SPO_SiteUrl>> with your own SharePoint root URL.
    For example: "https://uplus.sharepoint.com"
  4. In the Source column for the .GlobalSiteName property row, enter the site to which the SharePoint add-in app has access.
    For example: "sites/UPlus-Health"
  5. If your configuration uses an authentication profile that is different from the default one, in the Source column for the .AuthenticationProfile property row, replace SPOnlineAPICredentials with the value that matches the other authentication profile.
  6. Acquiring the SharePoint authentication details

  7. Find and open the D_SPOnlineGetRealm data page.
  8. Click ActionsRun.
  9. In the displayed window, select the Flush all instances of this data page before execution checkbox, and then click Run.
  10. Copy the values for the Realm and AudiencePrinciaplID properties.
    You need these values to configure the access token endpointin the authentication profile.
  11. Configuring the authentication profile

  12. Find and open the SPOnlineAPICredentials authentication profile.
  13. In the Client configuration section, populate the Client identifier and Client secret fields with the client ID and client secret from your SharePoint add-in app.
  14. In the Endpoint configuration section, replace the following placeholder strings with appropriate data:
    • <<SPO_Site_Domain>> – your SharePoint site domain
    • <<REALM>> – the Realm value from the D_SPOnlineGetRealm data page
    • <<Host_Name>> – your system-specific host for the redirect
  15. Next to the Access token endpoint field, click Edit access and refresh token parameters.
  16. In the Endpoint parameters window, in the Add access token parameters section, replace the following strings with appropriate data:
    • <<CLIENT_ID>> – the client ID from your SharePoint add-in app
    • <<REALM>> – the Realm value from the D_SPOnlineGetRealm data page
    • <<AudiencePrincipalID>> – the AudiencePrincipalID value from the D_SPOnlineGetRealm data page
    • <<SPO_Site_Domain>> – your SharePoint site domain
  17. Confirm changes to the endpoint parameters by clicking OK.
    The following figure illustrates all placeholders that you must replace with appropriate data:
    SharePoint authentication profile configuration
    Authentication profile rule for SharePoint that shows all placeholders values to be substituted.
  18. Confirm changes to the authentication profile rule by clicking Save.
What to do next: Add data types from the component to your application definition to use them in the context of your application. For more information, see Using the SharePoint Online component.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us