Aller au contenu principal

Deploy Data Model

There are several approaches to deploy the aqilink data model to SharePoint. For example, a customer might choose to deploy it to a Hub site and create additional site scripts that include the data model in each newly created site.

info

This chapter describes the deployment of the data model to a newly created SharePoint Online demo site, which will also be set up during this process. This approach serves as a reference for starting fresh without impacting any existing sites and without making the data model available on a Hub site at this point.

Prereqisites

  • Entra ID Application: Make sure to have an Microsoft Entra ID application created and its Application (client) ID ready.
  • PnP PowerShell: Make sure to have the latest PnP PowerShell cmdlets installed (at least PnP.PowerShell 2.10.0).
  • Microsoft 365 user: Ensure your Microsoft user account has sufficient permissions to log in to SharePoint and to create and manage sites. Logging in to the SharePoint Admin Center is necessary to create sites.

Create a new SharePoint Online Site

Log in to Microsoft SharePoint Admin Center (https://yourTenantName-admin.sharepoint.com) and create a new site. Choose a Communication Site when creating the SharePoint site, as this helps avoid the overhead associated with a Team site, making it more streamlined without unnecessary features (such as Group Integration, Task Management, Chat channels or other collaboration features).

View the newly created site and navigate to the Site contents. The "fresh" site should look like:

SPO: Create New Site

Apply the Data Model

To apply the aqilink data model to the new site, follow these steps.

info

Refer to the Download section to get the data model.

  1. Open a new Windows PowerShell console.
  2. Connect to the newly created SharePoint Site with interactive mode using the PnP PowerShell command below.
    1. Replace yourTenantName with the name of your tenant!
    2. Enter the correct Application (client) ID for -ClientId.
Example
Connect-PnPOnline -Url https://yourTenantName.sharepoint.com/sites/sap-demonstration `
-Interactive `
-ClientId <Entra Application (client) ID>
  1. You are prompted to select your organization's Microsoft account and then must accept the permissions requested by the Entra ID app on behalf of your user.

    PnP Login: Permission

  2. Now use the Invoke-PnPSiteTemplate cmdlet to apply the site template (which includes the data model) to the site:

    info

    The command without any parameters will apply the full site template. This includes, in addition to the fields and content types (data model), lists, and filters to create a "ready-to-start" SAP demonstration site. If you wish to deploy only the relevant fields and content types, you must extend the command with the appropriate -Handlers parameter. For more details, refer to the official Invoke-PnPSiteTemplate cmdlet documentation.

    In addition to the necessary fields and content types required for aqilink functionality, the full site template also includes pre-defined lists (such as for SAP Repositories and SAP Documents) and filters to enhance the user experience during testing. The created structure aligns with the rest of our examples.

    Command to Apply Full Site Template
    Invoke-PnPSiteTemplate -Path path/to/SAPSiteTemplate.xml

    Example how it should look like during the installation in PowerShell: MS Deployment: PNP Command

  3. The Site template was successfully applied. Refresh the site in SharePoint, and you'll see at least two new folders:

    MS Deployment: PNP Command

Apply Search Configuration

The next step after applying the site template is to upload and apply the custom aqilink search configuration to the SharePoint site. This ensures that specific search settings, such as managed properties for SAP-related content, are consistently applied. These settings influence how content is indexed, queried, and displayed in search results, optimizing search functionality for SAP-related data. The search configuration is also available in a XML file. Refer to the official Set-PnPSearchConfiguration cmdlet documentation to learn more about the available parameters and their purposes.

Apply Search Configuration to Site
Set-PnPSearchConfiguration -Path path/to/SAPManagedProperties.xml -Scope Site
info

If you have deployed the data model to an existing site, requesting a reindex may be beneficial. To initiate the process, execute the following PnP command:

Request-PnPReIndexWeb 

With the data model applied and other tasks from above completed, we recommend disconnecting from the SharePoint site:

Disconnect from Site
Disconnect-PnPOnline

Next Steps

Once the data model has been applied, you can proceed with creating the connection in SAP. Refer to SAP Customizing.