# Prepare Your Microsoft SharePoint Unstructured (Documents) Connection

To set up your Microsoft SharePoint unstructured content with Data 360, configure details in the Microsoft Azure Portal.

- Configure a [Microsoft Azure app](https://help.salesforce.com/s/articleView?id=ind.sf_contracts_create_a_microsoft_azure_app.htm\&type=5) to establish a connection between Salesforce and Microsoft.
  - Make note of the **Application (client) ID**, **Client Secret Value**, and **Directory (tenant) ID**.
  - Add API permissions to the App. Select **Microsoft Graph** as the API, and choose **Application permissions** (not Delegated permissions) for all of the following.
    - Option A - Broad Access\
      This option grants your application broad access to all SharePoint Sites, which is simpler to set up. Add the following Application permissions:
      - Files.Read.All (Application)
      - Sites.Read.All (Application)
    - Option B - Secure Workaround (Restricted Access)\
      This option uses the more restrictive Sites.Selected permission, requiring an extra step to explicitly grant the application access to specific sites. Add the following Application permission:
      - Sites.Selected (Application)

        Be sure to click Grant Admin Consent for \[your organization] to apply the permissions for whichever option you choose.

**Grant App Access to a Specific SharePoint Site (For Option B Only)**

If you choose the **Sites.Selected** permission, your application can’t access any site by default. Explicitly grant it access to the target site(s) before proceeding. This step requires a SharePoint or Global admin account with the **Sites.FullControl.All** scope.

1. **Retrieve Site ID:** Go to your SharePoint site and append `/_api/site/id` to the site URL. For example: `https://yourcompany.sharepoint.com/sites/dottedcloud-integration-testing/_api/site/id`. The API returns an XML response containing an `Edm.Guid` value — this is your short-form Site ID. For example, in the response `<d:Id m:type="Edm.Guid">a1b2c3d4-e5f6-7890-abcd-ef1234567890</d:Id>`, the Site ID is `a1b2c3d4-e5f6-7890-abcd-ef1234567890`.
2. **Request App Permission:** Use an API client like Postman, and send a POST request with the admin's access token to grant your app read access.
   - **Request URL:** POST `https://graph.microsoft.com/v1.0/sites/{siteId}/permissions`
   - **Headers:**
     - Authorization: Bearer \<admin_access_token>
     - Content-Type: application/json
   - **Body (JSON):**\
     JSON

```
{
    "roles": [ "read" ],
    "grantedToIdentities": [
        {
            "application": {
                "id": "<appId>",
                "displayName": "<your app name>
            }
        }
    ]
}
```

**Locate Your SharePoint Site ID**

You need your SharePoint Site ID to create an unstructured data lake object. Ask your SharePoint administrator, or do **one** of the following:

- Go to the SharePoint site and click **Settings**. Select **Site information**. The ID is under the URL heading.
- Alternatively, place the URL of your SharePoint site within a browser and append `/_api/site/id` at the end of the URL. For example: `https://yoursite.sharepoint.com/sites/siteName/_api/site/id`. The API returns an XML response. Note the value for Edm.Guid, as this is your Site ID.

Watch a comprehensive demo of how to configure the Microsoft SharePoint Unstructured (Documents) connector.

::video{src="v6q9uLz1fmCPJUgibTsaa1" title="MS SharePoint Unstructured (Documents) Connection Set-up" type="vidyard"}

[Get the Video Transcript](https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/VideoTranscript_MSSharePoint_Unst_Docs.pdf)

## Next Step

- [Create External Credentials for the Microsoft SharePoint Unstructured (Documents) Connector](/docs/data/data-cloud-int/guide/c360-a-microsoftsharepoint-unstructured-cred.md)
