In This Section
- Concepts
- Data
- Build
- The Composer
- The Page Index
- Context
- Pages
- Models
- Components
- Best Practices
- Debugging Skuid in the Console
- Logic
- Style
- Deploy
- Extend
- Reference
- The Property Library
- API Reference
- skuid.debug
- skuid.runtime
- skuid.$
- skuid.actions
- skuid.ajax
- skuid.builder.core
- skuid.builder.core.coreProps
- skuid.calendar
- skuid.collaboration
- skuid.component
- skuid.componentType
- skuid.events
- skuid.formula
- skuid.hotkeys
- skuid.label
- skuid.lightning
- skuid.load
- skuid.model
- skuid.model.Model
- skuid.mustache
- skuid.page
- skuid.sfdc
- skuid.snippet
- skuid.time
- skuid.utils
- skuid.version
- Component-Specific APIs
- Skuid Model Metadata Object
- Skuid Model Child Relationship Metadata Object
- Skuid Model Condition Metadata Object
- Skuid Model Field Metadata Object
- Skuid Model Record Type Metadata Object
- Page XML API
- skuid-sfdx
- Skuid Metadata Object Reference
- Skuid Glossary
- Formula and Function Reference
- Skuid and Date/Time
- Early Access Expectations
- Open Source Software Attributions
- Site Administration
- Tutorials
- Skuid Page Tutorials
- Build a Custom List Page
- Build a Custom Detail Page
- Compose a Branded Header and Navigation
- Compose a One-Page App Using Tab Actions and Conditional Rendering
- Conditionally Display Fields
- Highlight Critical Data: Wrappers, Rich Text, and Ui-Only Fields
- Mass Create Records
- Show Products in an Opportunity Page
- Skuid Pages for standard Salesforce CRM
- Salesforce Tutorials
- Skuid Page Tutorials
- Legal terms and conditions
- Skuid SFX Evaluation Guide
In This Topic
Sharepoint¶
Warning
This data source is deprecated and not available for use. This document remains viewable for legacy support and archival purposes.
If necessary, consider connecting to this service using a REST data source instead.
The SharePoint data source type allows end users to access and manipulate files and data stored in a Sharepoint Online instance. While similar to OneDrive, Sharepoint is intended for team collaboration and communication while working on a project. For more information on the differences between OneDrive and Sharepoint, see Microsoft documentation.
When configuring a connection to your Sharepoint instance, there are two different authentication mechanisms to choose from:
Using an OAuth 2.0 authentication provider
Using the SharePoint_SharedLogin custom authentication provider
Note
This method is only available to Skuid SFX users.
Warning
Sharepoint connections are not supported when using Skuid SFX in Lightning.
Connect Using OAuth 2.0 Authentication¶
To connect to SharePoint using OAuth2.0, you’ll need to complete three steps:
- Create a SharePoint app
- Create the SharePoint authentication provider
- Create the SharePoint data source
Prerequisites¶
First, ensure you have a SharePoint Online instance that is accessible online via a URL such as https://<CompanyName>.sharepoint.com, (where <CompanyName> is your SharePoint Online company name).
In Azure Active Directory¶
Configure an Azure Active Directory (AD) app registration and configure its API permissions.
Within the SharePoint API section, select the following:
AllSites.Write
- Read and write items in all site collections
Depending on your permission policies, you may alternatively wish to select AllSites.Read
AllSites.Manage
or even AllSites.FullControl
In Skuid¶
Create an authentication provider¶
Navigate to Configure > Data Sources > Authentication Providers.
Click New Authentication Provider.
Fill out the necessary fields:
Name: Enter a unique name, such as SharePoint_Auth
Authentication Method: OAuth 2.0 / OpenID
Provider Type: SharePoint Online
Grant Type: Authorization Code
Company Name: Your SharePoint Online Company Name.
Site Collection Path: Depending on the company’s SharePoint Online setup, it may be necessary to indicate the site collection path.
Note
Entering Company Name (and, if required, Site Collection Path) will auto-populate the following fields:
- The Authorize and Token Endpoint URLs
- Token Request Body Parameters
Client ID: Enter the Azure AD app registration’s client ID (see the previous section).
Client Secret: Enter the Azure AD app registration’s client secret (see the previous section.
Click Save.
If asked to create Remote Site Settings, click OK.
Create a data source¶
With the authentication provider configured, create a data source that uses it to authenticate and gain access to SharePoint data.
- Navigate to Configure > Data Sources > New Data Sources.
- Click New Data Source.
- Select the SharePoint data source type.
- Enter a unique name for your data source, such as SharePointOnline.
- Click Next Step.
- Enter the required information as noted below:
- URL/Endpoint:
https://<CompanyName>.sharepoint.com/_api
where <CompanyName> is your SharePoint Online company name. - OData Version: 3
- Check Use Proxy / Use Apex Proxy.
- Authentication Method: Authentication Provider
- Authentication Provider: Select the authentication provider you created in the previous section.
- URL/Endpoint:
- Click Save.
- If Skuid asks to create a Remote Site Setting, click OK.
You can now use your SharePoint data source within a model on a Skuid page.
Connect using the Sharepoint__SharedLogin authentication provider¶
Note
This authentication option is only available for Skuid SFX users.
To use the Sharepoint_SharedLogin authentication provider, you must save at least one set of Sharepoint username and password credentials within Skuid.
After saving these credentials, complete the following steps:
- Decide on a credentialing option
- Create the SharePoint data source
- Create a Remote Site setting for the SharePoint instance
Credential Options¶
Before creating the data source type, decide on the type of credentialing the data source will use.
Shared: Org-Wide credentials¶
With this option, all end users share a single Sharepoint login.
Warning
This option is not recommended unless all Skuid users have equal permissions for all data in the SharePoint instance.
Shared: Per-Profile credentials¶
If you have properly assigned data source profiles and permissions and would prefer to have logins shared by those profiles, select Shared: Per-Profile, with optional Org-Wide Default option.
Per-User credentials (recommended option)¶
If you want end users to enter their own credentials individually, choose Per-User, with optional Profile / Org-wide Defaults.
With Per-User credentials, users will need to enter their username and password for Sharepoint Online in the Credentials Management tab, accessible through the MyCredentials button in the Skuid navbar.
Note
If end users cannot access the My Credentials page, make sure that users’ Salesforce profiles or permission sets grant them access to the Credentials Management tab included in the Skuid app, and that this tab is both accessible and visible.
Create a data source¶
- Navigate to Configure > Data Sources > New Data Sources.
- Click New Data Source.
- Select the SharePoint data source type.
- Enter a unique name for your data source, such as SharePointOnline.
- Click Next Step.
- Enter the URL of the Sharepoint database that allows API access. This should be similar to
https://<CompanyName>.sharepoint.com/_api
where <CompanyName> is your SharePoint Online company name. - Check Use Apex Proxy.
- For Authentication:
- Authentication Method: Authentication Provider (OAuth, Custom, etc)
- Authentication Provider: SharePoint_SharedLogin.
- Credential Source: (See the previous section for details on these options)
- Shared: Org-Wide
- Shared: Per-Profile, with optional Org-wide Default
- Per-User, with optional Profile / Org-wide Defaults
Once the Credential Source is selected, two new fields open. If using Shared: Org Wide, or using the option Org-wide default for the other two options, enter the following information:
Org-wide default username
Org-wide default password
Note
These credentials will NOT be visible or accessible to Skuid page users, but Skuid will use these credentials to authenticate users when making requests to SharePoint Online.
- Click Save.
- Skuid will ask to create a Remote Site Setting. Click OK.
Remote Site Settings¶
Skuid automatically created the Remote Site Setting for the actual Sharepoint instance (see Step 11, above); you must manually setup a Remote Site Setting for the Microsoft login URL that Skuid uses to authenticate to SharePoint Online.
In Salesforce Setup:
- Navigate to Security Controls > Remote Site Settings.
- Click New Remote Site.
- Give the Remote Site a descriptive name (something like “Skuid_Sharepoint_SharedLogin”).
- For the Remote Site URL, enter
https://login.microsoftonline.com
. - Click Save.
If using Shared: Per-Profile credentials¶
After saving the data source and creating the Remote Site settings, find the data source in the list of data sources (Configure > Data Sources) and click Advanced Settings next to the SharePoint data source.
- Click Profile Credentials in the top right of the configuration area.
- Click fa-plus-circle Add to create new credential sets with the following fields:
- Applies to: Select from the picklist.
- Username
- Password
Using the Sharepoint Data Source Type¶
After configuring your authentication and data source settings, you can create models that reference Sharepoint objects.
In a Skuid page, click fa-plus-circle Add Model to create a new model, then edit the model:
- Name: Give the model a name
- Data Source Type: Sharepoint.
- Data Source: Select the data source that points to your Sharepoint database.
If using OAuth authentication [[]]¶
At the first use of this data source, Skuid opens a popup asking you to log into the Sharepoint app. Once logged in, SharePoint will display a screen asking, “Do you trust [the Skuid Sharepoint app title]?” Click Trust It.
When this is complete, the SharePoint object list will populate allowing you to select SharePoint external objects.
Warning
The browser may block this popup. In Google Chrome‚ for instance, a red X and a window icon appears in the URL bar.
Click on the icon, and then click Always allow popups from…
Click Done.
Click on this icon again, then click on the link that was blocked to open it up.
Other browsers will have similar processes to unblock popups.
Select the SharePoint External Object from the picklist.
- Model Label and Model Plural Label fields: enter appropriate labels.
Add Fields and Conditions, etc. to the model, as needed. Click Save.
Save and then Preview the page.
You can now use your SharePoint data source within a model on a Skuid page.
Using Sharepoint with the File Upload Component¶
You may use the File Upload File Upload Component to upload files to SharePoint. If you select a Sharepoint model for your File Upload Data Source Type, the following fields will appear:
- File Storage Location:
relative_server_url
- This default value simply means files will be sent to the URL specified during data source configuration. This value the cannot be changed.
- Label: Entering a label will insert custom text for the upload button. Leaving this field blank will result in a button that simply says Upload.
- File Name: Use this field to rename any files uploaded through the file component.
- This field is compatible with Merge Syntax.
- If this field is blank, files will retain their original name.
- Relative folder URL: The parameter Skuid will append to the File Storage location URL.
- Update Metadata: Specify what, if any, metadata values will be sent to SharePoint along with the uploaded file. These values will update column records in the Sharepoint folder set as the storage location. Column values are updated by name-value pairs, which are separated by a colon and then delimited with a comma.
For example, if your SharePoint folder has an OpportunityName and RecordID column, inserting "OpportunityName:KrakenConsulting, RecordID:0001"
into this field would update the OpportunityName column record for the uploaded file to KrakenConsulting
and the RecordId column record to 0001
.
Data Source Actions¶
- Download File: Commonly used as a row action with the
SP.Files
entity, this action downloads a file.- File URL (Required): The URL Skuid uses to download files. Accepts merge syntax. In most use cases, this value should be {{Url}}.
Note
- Ensure that your
SP.Files
model is pulling in the Url field. - Folders cannot be downloaded and will deliver an error page to the end user if an attempt is made. If using this action type in a row action, use display logic to display the action when
Size != 0
, as folders do not have a file size in Sharepoint.
Troubleshooting¶
I’m having issues connecting to my instance [[]]¶
If using OAuth to connect to Sharepoint, verify that the authentication provider is properly configured.
Most importantly—even if the Company Name and Site Collection path properties have been set—ensure that the
<Company Name>
and<Site Collection Path>``values have been updated in the **authorize endpoint URL** and the ``<Company Name>
value has been updated in the token endpoint URL.If issues continue, try creating a remote site setting for
https://<Company Name>.sharepoint.com/_api/$metadata
, where<Company Name>
matches the name of your organization.
Nothing appears when I try to select a model object [[]]¶
Verify that the Permission Request XML has been updated in your Sharepoint app registration.
General debugging [[]]¶
- See the data troubleshooting for general debugging advice.
- Visit community.skuid.com to ask questions or report problems and give feedback.