Drawings2CM Azure App Registration
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
-
Sign in to the Azure web portal using the link below https://azure.microsoft.com/en-gb/features/azure-portal/
-
Once signed in, click on the Azure Active Directory button

-
Click on the App Registrations option from the left menu

-
Click on the New registration button
-
Enter Drawings2CM into the name input field

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

-
Select Single-page application (SPA) from the drop-down menu and type in the full HTTPS address of the Drawings2CM application
NoteThe 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/
-
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.
-
Click on API permissions from the left menu

-
Click on the Add Permissions button
-
When the right-hand permission panel appears, click on Microsoft Graph (This will be at the very top)

-
Click on Application permissions

-
Using the select permission window, add the following permissions to the application
-
Files.ReadWrite.All
-
Group.Read.All

-
Scroll down to the bottom of the panel and click the Add Permission button
-
Go back and repeat Steps 2 and 3 except this time select Delegated permissions

-
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)
-
Scroll down to the bottom of the panel and click the Add Permission button
-
An Azure administrator will need to grant permission for the application to access the resources by clicking on the Grant Permission button
-
Once granted the status will update to Green, indicating the permission has been successfully granted
NoteDo not remove the default user.read delegated permission
API PERMISSION USAGE
| NAME | TYPE | DESCRIPTION | CONSENT REQUIRED | USAGE |
|---|---|---|---|---|
| Files.ReadWrite.All | Application | Read and write files in all site collections | Yes | This permission is used by the Teams Archiver to move documents from the archived Team to Content Manager. |
| Groups.Read.All | Application | Read all groups | Yes | This permission is used by the Teams Archiver to locate the archived Team and transfer documents from it |
| Channel.ReadBasic.All | Delegate | Read basic information from channels | No | Required for archiving all channels posts from a Team |
| Files.ReadWrite.All | Delegate | Have full access to all files the user can access | No | Required for uploading Files and Folders to a Team channel |
| Sites.Read.All | Delegated | Read items in all site collections | No | Used to display all sites that the logged-in user has access to |
| Group.Read.All | Delegate | Read all groups | No | Required for showing a list of all Teams available for the organization to transfer documents to |
| Team.ReadBasic.All | Delegate | Read the names and descriptions of teams | No | Required retrieving the Team General folder |
| TeamMember.ReadWrite.All | Delegate | Add and remove members from teams | No | Send an invitation to guests |
| User.Read | Delegate | Read basic information for logged-in user | No | Default 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.
-
In the Left Menu, click on the Expose an API option

-
Next to the Application ID URI click on Set

-
Click on the Save button
NoteDo not Change the Application ID URI. It must be in the following format: api://{client id}

-
Click on the Add a scope button

-
Specify the values below in the Add a scope window, then click Add scope
NoteThe scope must be named Grant.Access
Field Value Scope Name Grant.Access Who can consent? Admins and users Admin Consent display name Grant Access to Drawings2CM Admin consent description Grant Access to Drawings2CM State Enabled 
-
Once the scope has been added, click on API permissions

-
Click on Add a permission

-
Click My APIs

-
Click on the Azure app registration for Drawings2CM
-
Click on the Grant.Access scope and click Add permissions

-
Click on Grant admin consent
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.
-
Click on Certificates and Secrets on the left-side menu

-
Click on the Client secrets tab and click New client secret
-
Provide a unique description and select an expiry period for your secret
-
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

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:
-
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

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

-
Please ensure the account that will be running the application pool has access to the certificate private key
-
Right-click the certificate > All Task > Manage Private Key

-
Grant the account running the app pool full control permission on the certificate
-
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
-
Upload your certificate public key (.CER) to Microsoft Azure for the Drawings2CM application by going to the Certificates & secrets section

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.

The Redirect URI can be accessed via the Authentication page.

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.
-
Select the registered application on Azure
-
From the Overview page select Endpoints

