Skip to main content

FYB Connect CM2SP Entra ID App Registration

Raise a support ticket

OVERVIEW​

To use CM2SP, you are required to register the application on Azure Active Directory. The application will be used to acquire an access token to make web API requests to access certain Microsoft resources for a tenant (organisation). The app is registered via the Azure Web portal

APP REGISTRATION​

  1. Sign in to the Azure web portal using the link below https://azure.microsoft.com/en-gb/features/azure-portal/

  2. Once signed in, click on Azure Active Directory

    image.png

  3. Click on App Registrations from the left menu

    image.png

  4. Click on the New registration button

    image.png

  5. Enter CM2SP into the name input field

    name.jpg

  6. Under Supported account types section enabled Accounts in this organizational directory option

    image.png

  7. Click on the Register button

AUTHENTICATION​

  1. Click AUTHENTICATION

    2021-08-02_17-37-19.png

  2. Under Platform configurations click Add a platform

    2021-08-02_17-38-51.png

  3. Click Single-page application

    spa.jpg

  4. For the Redirect URI field, type in the URL configured for FYB Connect, followed by /cm2sp/

    Note

    The URI is case sensitive; the route must match exactly the pattern below, where the only variable that needs to be replaced is the domain. Please include the trailing slash in the URL and ensure all characters are in lowercase. Example: https://[domain]/fybconnect/cm2sp/

    2024-10-14_17-42-27.png

  5. Click the Configure button

    configure.jpg

GRANTING API PERMISSION​

The application will require various API permissions. Please follow the steps below to add the required permissions for CM2SP.

  1. Click on the API permissions option from the left menu

    image.png

  2. Click on the Add Permissions button

    image.png  

  3. When the right-hand permission panel appears, click on Microsoft Graph (This will be at the very top)

    image.png

  4. Click on Application permissions

    image.png

  5. Using the select permission window, add the following permissions to the application

  • Files.ReadWrite.All

    image.png

  1. Scroll down to the bottom of the panel and click the Add Permission button

    image.png

  2. Go back and repeat Steps 2 and 3, except this time select Delegate permissions

    2022-01-28_16-39-49.png

  3. Using the select permissions window, add the following delegate permissions to the application

  • Files.ReadWrite.All
  • Sites.Read.All
  1. Click on Grant Admin Consent

    2024-10-14_17-10-41.png

    Note

    Do not remove the default user.read delegated permission

API PERMISSIONS USAGE​

NAMETYPEDESCRIPTIONCONSENT REQUIREDUSAGE
Sites.Read.AllDelegatedAllows the app to read documents and list items in all site collections on behalf of the signed-in user.YesUsed to display all sites that the logged in user has access to in the Sites page of CM2SP
Files.ReadWrite.AllDelegatedAllows the app to read, create, update, and delete all files the signed-in user can access.YesUsed to allow user initiated archives to transfer documents from Content Manager to SharePoint
Files.ReadWrite.AllApplicationRead and write files in all site collections. Required for the scheduler to transfer files to SharePoint without user interactionYesThis permission is used by the background scheduler to move documents from Content Manager to SharePoint.

HOW TO GET THE APPLICATION ID​

Please follow the steps below to retrieve the application ID on the Azure portal. This is required for the installation.

  1. Once signed in to the Azure portal, click on Azure Active Directory

    image.png

  2. Click on App registrations

    image.png

  3. Click on the required application (CM2SP created previously)

  4. Click on Overview

    overview.jpg

  5. Copy the Application (client) ID to the clipboard (you will need this value for the MSI)

    app id.jpg

HOW TO GET THE TENANT INFORMATION​

Please follow the steps below to retrieve the Tenant ID and Tenant Name on the Azure portal. This is required for the installation.

  1. Once signed in to the Azure portal, click on Azure Active Directory

    image.png

  2. Click on Overview

    2020-08-25_11-20-46.png

  3. The Tenant ID can be found under the Tenant ID section, and the Tenant Name can be found under the Primary Domain Section

    tenant.jpg

EXPOSE THE API​

Applying a custom scope to the registration will prevent unauthorised access to the CM2SP API endpoints.

  1. In the Left Menu, click on Expose an API

    2022-08-04_11-11-50.png

  2. Next to the Application ID URI click on Set

    2022-08-04_11-13-18.png

  3. Click Save

    Note

    Do not change the Application ID URI. It must be in the following format: api://{client id}

    2022-08-04_11-14-32.png

  4. Click Add a scope

    2022-08-04_11-17-32.png

  5. Specify the values below in the Add a scope window, then click Add scope

    Note

    The scope must be named Grant.Access

    FieldValue
    Scope NameGrant.Access
    Who can consent?Admins and users
    Admin Consent display nameGrant Access to CM2SP
    Admin consent descriptionGrant Access to CM2SP
    StateEnabled

    image-9C39SFQK.png

  6. Once the scope has been added, click on API permissions

    2022-08-04_11-30-18.png

  7. Click on Add a permission

    image.png

  8. Click My APIs

    image.png

  9. Click on the previously created CM2SP Azure app registration

    image.png

  10. Click on the Grant.Access scope and then click Add permissions at the bottom of the screen

    image.png

  11. Click on Grant admin consent

    2022-08-04_11-37-57.png

CERTIFICATE-BASED AUTHENTICATION​

The background scheduler component of the application utilises certificate-based authentication to verify its identity to Microsoft Azure. As such, you will need to register a certificate for your application on Azure AD. You can choose to use an existing certificate if you have one (the same certificate used for the CM2SP site), or otherwise, you can create/purchase a new certificate for this purpose. Please follow the steps below on how to upload a certificate:

  1. After obtaining a copy of your certificate (.pfx), install the certificate in the Certificate Manager tool under local machine on the server where the application will be installed on

    Certificates

  2. Ensure the certificate has been given a friendly name; this is required when installing the app on the server

    2020-09-01_14-25-22.jpg

  3. Please ensure the account that will be running the application pool for the application has access to the certificate private key

  4. Right-click the certificate > All Task > Manage Private Key

    image.png

  5. Grant the account running the app pool full control permission on the certificate

  6. Export the public key from the certificate using this guide (https://docs.microsoft.com/en-us/azure/application-gateway/certificates-for-backend-authentication). You will only need to complete steps 1 to 7 in the Export authentication certificate (for v1 SKU) section

  7. Upload your certificate public key (.CER) to Microsoft Azure for the 365|2CM application by going to the Certificates & secrets section

    Certificates2

UPDATING THE CERTIFICATE FRIENDLY NAME​

If the certificate in the Entra app has expired and the new certificate has a different friendly name, follow the steps below to update the certificate's friendly name in FYB Connect:

  1. Navigate to the CM2SP install directory (C:\Program Files\FYB Pty Ltd\FYBConnect\CM2SP)

  2. Open the appsettings.Production.json file as an Administrator

  3. Within the MsalConfig section, update the value of the CertificateName property to the value of the new certificate's friendly name

    2025-01-08_8-55-03.png

  4. Save the file

  5. Perform an app pool restart on the CM2SP application within IIS

VALUES REQUIRED FOR INSTALLATION​

The following values will be required for the installation of CM2SP. Please ensure that the person responsible for the installation has these values.

  • Redirect URI
  • Application ID
  • Tenant ID
NameDescription
Redirect URIThe URI where Azure will send the authentication payload upon successful authentication. Please refer to the Redirect URI section to acquire the redirect URI.
Application IDApplication ID of the registered CM2SP application. Please refer to the HOW TO GET THE APPLICATION ID section for further info.
Tenant IDThe organisation tenant unique identifier on Azure Portal. Please refer to the HOW TO GET THE TENANT INFORMATION section for further info.
Certificate Friendly NameThe friendly name of the nominated certificate (.pfx) installed on the machine. This certificate is used to prove the application's identity by encrypting the application's claims in the form of a JWT token.