You are viewing an earlier version of the admin guide. For the latest version, please visit EmpowerID Admin Guide v7.211.0.0.

Provision a Cosmos DB Account for SharePoint Online

The SharePoint Online microservice uses Cosmo DB for SQL configured with information specific to your tenant. This article takes through the provisioning and configuration steps.

Provision a Cosmos DB account

  1. In Azure, navigate to All services and select Azure Cosmos DB.

  2. Click Add.

  3. Under Project Details, select a Subscription and create a new Resource Group.

  4. Under Instance Details, do the following:

    • Account Name – Enter a name for database account

    • API – Core (SQL)

    • Location – Select the appropriate geographic location

    • Capacity mode – Provisioned throughput

  5. Click Review + Create.

  6. Review the settings and make any adjustments needed for your environment and then click Create.

Wait for Azure to create the database account and then follow the below steps to add a container.

Add a container to the Cosmos DB account

  1. On the navbar for the Cosmos DB account, select Data Explorer and then click New Container.

  2. Enter the following information in the New Container pane:

    • Database id – Name of the container

    • Database throughput – Autoscale

    • Database Max RU/s – 4000

    • Container id – Name of the container

    • Partition key – /id

  3. Click OK.

Wait for Azure to create the container and follow the below steps to add JSON configuration information to the container.

Add JSON configuration information

  1. On the navigation tree for the db account, expand the container node and select Items.

  2. Click New Item and enter the following JSON, replacing values for those in your environment.

    "id": "sposvcconfig_<YOUR TENANT ID>", "realId": "sposvcconfig_<YOUR TENANT ID>", "document": { "Id": "sposvcconfig_<YOUR TENANT ID>", "SiteCollection": ["ARRAY OF YOUR SITE COLLECTIONS"], "MaximumCountToRebuildTopology": -1, "RootSiteUrl": "ROOT SITE URL OF YOUR SPO TENANT", "AdminSiteUrl": "ADMIN SITE URL FOR YOUR SHAREPOINT", "ClientId": "<CLIENT ID OF THE SERVICE PRINCIPAL WITH API PERMISSIONS>", "TenantId": "<YOUR TENANT ID>", "TenantDomain": "<YOUR TENANT DOMAIN>", "ClientCertificate": "NAME OF THE CERTIFICATE CREATED IN THE KEY VAULT", "VaultUrl": "<URL TO YOUR KEY VAULT>/", "Pfx": null }


    Example:

    "id": "sposvcconfig_75f7e24e-98bd-4604-be22-3f8cd2295ff0", "realId": "sposvcconfig_75f7e24e-98bd-4604-be22-3f8cd2295ff0", "document": { "Id": "sposvcconfig_75f7e24e-98bd-4604-be22-3f8cd2295ff0", "SiteCollection": [], "MaximumCountToRebuildTopology": -1, "RootSiteUrl": "https://eiddev1.sharepoint.com", "AdminSiteUrl": "https://eiddev1-Admin.sharepoint.com/", "ClientId": "a8de145c-da58-4a40-a3ef-681bbd63889c", "TenantId": "75f7e24e-98bd-4604-be22-3f8cd2295ff0", "TenantDomain": "eiddev1.onmicrosoft.com", "ClientCertificate": "SPODAuth", "VaultUrl": "https://spo-kv-doc.vault.azure.net/", "Pfx": null }

     

  3. Save your changes.

  4. Navigate to the Keys blade and copy the URI and primary key values. You use these when adding configuration settings to the SharePoint Online app service.


Next steps

Create a Function app to update user profile properties

Add application settings to the app service

Add secret to key vault in EmpowerID tenant

Publish the SharePoint Online Microservice