Skip to main content

Drawings2CM Azure App Registration

Raise a support ticket

OVERVIEW​

To use Drawings2CM 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).

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 the Azure Active Directory button

    image.png

  3. Click on the App Registrations option from the left menu

    image.png

  4. Click on the New registration button

    image.png

  5. Enter Drawings2CM into the name input field

    2022-06-03_17-23-52.png

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

    image.png

  7. Select Single-page application (SPA) from the drop-down menu and type in the full HTTPS address of the Drawings2CM application

    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 hostname. Please include the trailing slash in the URL. Example: https://hostname/Drawings2CM/

    2022-06-03_17-25-31.png  

  8. Click on the Register button

GRANTING API PERMISSION​

The application will require various API permissions, please follow the steps below to add the required permissions for Drawings2CM.

  1. Click on API permissions 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

  • Group.Read.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 Delegated permissions

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

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

  • Channel.ReadBasic.All

  • Files.ReadWrite.All

  • Group.Read.All

  • Sites.Read.All

  • Team.ReadBasic.All

  • TeamMember.ReadWrite.All

  • User.Read (If not already added)

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

    image.png

  2. An Azure administrator will need to grant permission for the application to access the resources by clicking on the Grant Permission button

  3. Once granted the status will update to Green, indicating the permission has been successfully granted

    2022-06-03_17-30-15.png

    Note

    Do not remove the default user.read delegated permission

API PERMISSION USAGE​

NAMETYPEDESCRIPTIONCONSENT REQUIREDUSAGE
Files.ReadWrite.AllApplicationRead and write files in all site collectionsYesThis permission is used by the Teams Archiver to move documents from the archived Team to Content Manager.
Groups.Read.AllApplicationRead all groupsYesThis permission is used by the Teams Archiver to locate the archived Team and transfer documents from it
Channel.ReadBasic.AllDelegateRead basic information from channelsNoRequired for archiving all channels posts from a Team
Files.ReadWrite.AllDelegateHave full access to all files the user can accessNoRequired for uploading Files and Folders to a Team channel
Sites.Read.AllDelegatedRead items in all site collectionsNoUsed to display all sites that the logged-in user has access to
Group.Read.AllDelegateRead all groupsNoRequired for showing a list of all Teams available for the organization to transfer documents to
Team.ReadBasic.AllDelegateRead the names and descriptions of teamsNoRequired retrieving the Team General folder
TeamMember.ReadWrite.AllDelegateAdd and remove members from teamsNoSend an invitation to guests
User.ReadDelegateRead basic information for logged-in userNoDefault permission set by Azure, used to allow users to sign in

EXPOSE THE API​

Exposing the API will prevent unauthorized access to the Drawings2CM API endpoints.

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

    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 on the Save button

    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 on the Add a scope button

    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 Drawings2CM
    Admin consent descriptionGrant Access to Drawings2CM
    StateEnabled

    image.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

    2022-08-04_11-31-26.png

  8. Click My APIs

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

  9. Click on the Azure app registration for Drawings2CM

  10. Click on the Grant.Access scope and click Add permissions

    2022-08-04_11-36-29.png

  11. Click on Grant admin consent

    image.png

CONFIGURE CLIENT SECRET​

Drawings2CM utilizes Power Automate for its workflow engine. To securely transfer data from Power Automate to the Drawings2CM application a client secret will be required.

  1. Click on Certificates and Secrets on the left-side menu

    image.png

  2. Click on the Client secrets tab and click New client secret

    image.png

  3. Provide a unique description and select an expiry period for your secret

    image.png

  4. Ensure to copy the Value to somewhere secure. Once you navigate away from this page you will be unable to access the secret value again

    2023-02-13_10-05-34.png

UPLOAD CERTIFICATE​

The Drawings2CM web application installed on your server utilizes a certificate-based authentication to verify its identity to Microsoft Azure. As such you will need to register a certificate for your application in the registration portal. You can choose to use an existing certificate if you have one (the same certificate used for TLS/SSL for the Drawings2CM Site) 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 to the Certificate Manager tool under local machine on the server the application will be installed on

    Certificates

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

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

  3. Please ensure the account that will be running the application pool 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 Drawings2CM application by going to the Certificates & secrets section

    Certificates2

VALUES REQUIRED FOR INSTALLATION​

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

  • Redirect URI
  • Application ID
  • Tenant ID
  • Certificate Friendly Name
  • Client Secret

The Application ID and Tenant ID can be accessed via the Overview page.

image.png

The Redirect URI can be accessed via the Authentication page.

image.png

The Certificate Friendly Name and Client Secret must be obtained when these items are first configured.

ENDPOINTS​

All valid endpoints for the registered application can be seen via the Azure web portal.

  1. Select the registered application on Azure

  2. From the Overview page select Endpoints

    2020-11-27_11-02-10.jpg