Dialogue Cloud

Creating a OneUCC Site using PnP.PowerShell

Introduction

This is the preferred method for creating sites for new UCC A Unified Contact Center, or UCC, is a queue of interactions (voice, email, IM, etc.) that are handled by Agents. Each UCC has its own settings, IVR menus and Agents. Agents can belong to one or several UCCs and can have multiple skills (competencies). A UCC can be visualized as a contact center “micro service”. Customers can utilize one UCC (e.g. a global helpdesk), a few UCC’s (e.g. for each department or regional office) or hundreds of UCC’s (e.g. for each bed at a hospital). They are interconnected and can all be managed from one central location.'s or when an update from an older version of the Ucc.creator template is required.

In short, the below instruction is a procedure to create and build UCC SharePoint sites with no interaction to the SharePoint-admin portal, minimal access to the Microsoft Entra ID Formerly known as Azure Active Directory (or Azure AD, or AAD) App portal and most interactions via PnP.PowerShell.

Prerequisites

Note

Installation files can be obtained from AnywhereNow or an authorized Partner.

1. Generate Certificate

Time to execute: approx. 10 min.

Follow Microsoft's instructions on generating a private certificate (no cost involved, just PowerShell) for your Entra ID App-only access, Learn More - Microsoft
In summary:

  1. Copy and Run the Microsoft provided PowerShell script to generate your private X.509 certificate. When asked for:

    • CommonName (we suggest "AnywhereAppOnly", or adhere to your IT naming conventions)

    • StartDate (we suggest your current date)

    • EndDate (we suggest you adhere to your IT policy for certificate renewal dates)

    • Password (we suggest you adhere to your IT policy for password formats)

    Output should be similar to (but could be different if you run the script with parameters for these values)

2. Create New PnP.PowerShell Application

Time to execute: approx. 1 min.

Announcement (September 2024)

PnP PowerShell has changed security restrictions as of September 9th 2024. This affects the Connect-PnPOnline step mentioned below from this moment on when you want to create new sites. For more communication by the PnP team see: https://pnp.github.io/powershell/index.html

This should return an AppId which you can use in the updated Connect-PnPOnline - Interactive step.

Run the following command (adapted from: https://pnp.github.io/powershell/articles/registerapplication.html) and populate the <your-tenant> variable:

Copy

PnP.PowerShell

Register-PnPEntraIDAppForInteractiveLogin -ApplicationName "AnywhereNow-OneUCC-PnPApp" -Tenant <your-tenant>.onmicrosoft.com -Interactive

3. Add a Microsoft Entra App Registration for "Sites.Selected" only

Time to execute: approx. 5 min.

Tip

You can also use the now required App needed and created above for the PnP.Powershell add-in to include the Application permission requested below and use that app as your Microsoft Entra Id Application for creating your UCC sites.

Add a new App Registration to your Microsoft Entra admin center, visit - https://entra.microsoft.com/

  • Goto Applications -> App registrations -> + New registration
    or
    Find Application with name "AnywhereNow-OneUCC-PnP-App"

  • As a name for a new App registration we suggest something like "AnywhereNow Ucc Site Creator AppOnly".
    or

    Select Application with name "AnywhereNow-OneUCC-PnP-App"

    or

  • Goto API permissions -> Add a Permission -> SharePoint -> Application permissions -> Sites.Selected -> Add permissions

    or

Note

You may have noticed the permissions requested in this step differ from the permissions requested in the legacy Ucc.Creator installation method. This is correct and deliberate. The permissions requested on this page only work with the installation instruction provided on this page. The permissions requested on the legacy Ucc.Creator installation page only work with the installation instruction provided on the legacy Ucc.Creator installation page.

  • click Grant admin consent for <tenant-name>

    or

  • Goto Certificates & secrets -> Certificates -> Upload certificates -> select your local .cer certificate file -> enter Description -> Add

  • Goto Overview to verify and collect your ID's to use in the PnP.PowerShell scripts and commands

  • Remember to copy and safeguard the Application (client) ID

  • Remember to copy and safeguard the Password you entered during certificate creation (.pfx and .cer file).

  • Remember to copy and safeguard the certificate .pfx and .cer file.

  • You should know your Microsoft 365 Directory (tenant) ID

4. Create and Prepare Site using PnP.Powershell

Announcement (September 2024)

PnP PowerShell has changed security restrictions as of September 9th 2024. This affects the Connect-PnPOnline step mentioned below from this moment on when you want to create new sites. For more communication by the PnP team see: https://pnp.github.io/powershell/index.html

This should return an AppId which you can use in the updated Connect-PnPOnline - Interactive step.

Time to execute: approx. 10 min.

  • Step 1: Start PowerShell 7

  • Step 2: Connect to your SharePoint Online tenant

    Copy
    PnP.PowerShell
    Connect-PnPOnline -Url https://<tenant-name>.sharepoint.com/ -Interactive -ClientId <Your-AnywhereNow-OneUCC-PnPApp-Id>

    Example:

  • Step 3: Create a SharePoint site (formerly known as site collection) for a UCC

    Copy
    PnP.PowerShell
    New-PnPSite -Type TeamSiteWithoutMicrosoft365Group -Title <ucc-name> -Url https://<tenant-name>.sharepoint.com/sites/<ucc-name> -Lcid <4-Digits>

    Example:

    Note

    1: In this example a site of type TeamSiteWithoutMicrosoft365Group is selected. Other types are possible like CommunicationSite or a regular TeamSite but they may create additional resources not typically used for a UCC site, like an email address or a Team Group.

    2: The Country Code parameter (-Lcid) defines the default localization (language) of this SharePoint site. It cannot be changed afterwards! It should match the localization in which you want to create and present the UCC site to your end-users. (i.e. it should be the same language selected in Step 3: Add UCC Name -> DisplayName -> Language to UCC creator list in the Ucc site )

    For more information on PnP parameters see: New-PnPSite.html

  • Step 4: Enable custom scripting on the created UCC site

    Copy
    PnP.PowerShell
    Set-PnPSite -Identity https://<tenant-name>.sharepoint.com/sites/<ucc-name> -NoScriptSite $false

    Example:

  • Step 5: Grant write permissions to the site for the App Registration created. (This is needed prior to elevate the permission to FullControl)
    The output of this command will provide an ID string needed in the next step.

    Copy
    PnP.PowerShell
    Grant-PnPAzureADAppSitePermission -AppId <Guid> -DisplayName "<String>" -Permissions Write -Site https://<tenant-name>.sharepoint.com/sites/<ucc-name>

    Example:

  • Step 6: Elevate permission of the App-only App for the UCC site to FullControl.

    Copy
    PnP.PowerShell
    Set-PnPAzureADAppSitePermission -PermissionId <LongString> -Permissions FullControl -Site https://<tenant-name>.sharepoint.com/sites/<ucc-name>

    Example:

5. Run Ucc.Creator template scripts

Time to execute: approx. 20 min.

Next Steps for OneUCC Sites?

  1. Repeat the steps in heading 4 and 5 for every UCC you want to request on Dialogue Cloud (or when replacing existing UCC (sub)sites) .

  2. Grant Dialogue Cloud App-Only access to all your UCC sites, see: SharePoint Online Authentication for Anywhere 365 Dialogue Cloud Microsoft Entra ID App-Only

  3. Set the additional permission for Dialogue Cloud on all your UCC Sites using an easy PowerShell script and private App Registration, see Granting permission to Multiple Sites - Powershell Script

  4. Add your new UCC sites to OnePortal Formerly known as Partner Portal. A redesigned web portal for managing Dialogue Cloud deployments.:

  5. (Optional) Other Applications

How to Update Sites

  • To update a UCC site to a higher version (if and when it becomes available in a bundle), enter the site and certificate details in the configuration.xml file and run Ucc.Update.ps1 script, for every site you need to update.