--- title: "Create eSHARE Classify SPO Columns Entra ID App Registration" slug: "create-eshare-classify-spo-columns-entra-id-app-registration" description: "Set up a Microsoft Entra ID app registration, certificate, permissions, and tenant configuration for eSHARE classification scripts in SharePoint." tags: ["App Registration", "SPO Columns", "Classify", "eSHARE Classify", "SharePoint Inventory", "Classification Columns", "data classification", "Data Attributes"] updated: 2026-11-16T02:39:55Z published: 2026-11-16T02:39:55Z canonical: "docs.eshare.com/create-eshare-classify-spo-columns-entra-id-app-registration" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.eshare.com/llms.txt > Use this file to discover all available pages before exploring further. # Create eSHARE Classify SPO Columns Entra ID App Registration This document describes how to create the Microsoft Entra ID app registration that the eSHARE classification scripts sign in with, and the tenant configuration file that points the scripts at it. It is separate from the eSHARE app registration created when you connected eSHARE to Microsoft 365, and is used only by the column scripts. You need to do this once per tenant. The following steps will be reviewed: - [Create the Certificate](/collaborate/docs/create-eshare-classify-spo-columns-entra-id-app-registration#create-the-certificate) - [Register the App](/collaborate/docs/create-eshare-classify-spo-columns-entra-id-app-registration#register-the-app) - [Add the Permissions and Grant Consent](/collaborate/docs/create-eshare-classify-spo-columns-entra-id-app-registration#add-the-permissions-and-grant-consent) - [Create the Tenant Configuration File](/collaborate/docs/create-eshare-classify-spo-columns-entra-id-app-registration#create-the-tenant-configuration-file) - [Test the Connection](/collaborate/docs/create-eshare-classify-spo-columns-entra-id-app-registration#test-the-connection) > **PREREQUISITES:** > > Creating the app requires an **Application Administrator** or **Global Administrator**. Granting admin consent requires a **Global Administrator** or **Privileged Role Administrator**. Complete [Prepare the Workstation](/collaborate/docs/eshare-classify-overview#prepare-the-workstation) first. ### **Create the Certificate** The app signs in with a certificate instead of a password. Create it on the computer that will run the scripts. 1. In PowerShell 7, create a self-signed certificate in your user certificate store and export its public key: ```powershell $cert = New-SelfSignedCertificate -Subject "CN=eSHARE Classify SPO Columns" `    -CertStoreLocation "Cert:\CurrentUser\My" -KeyExportPolicy Exportable `    -KeySpec Signature -KeyLength 2048 -HashAlgorithm SHA256 -NotAfter (Get-Date).AddYears(1) Export-Certificate -Cert $cert -FilePath "$HOME\eSHARE-Classify-SPO-Columns.cer" $cert.Thumbprint ``` 1. Copy the thumbprint that is displayed. You will need it for the tenant configuration file. > [!WARNING] > Note: > > On macOS or Linux, the scripts need a **.pfx** file instead of a thumbprint. Create one with OpenSSL, or export the Windows certificate with `Export-PfxCertificate`. Keep the .pfx outside any shared or synced folder, as it holds the app's private key. ### **Register the App** 1. Sign in to the Microsoft Entra admin center for your cloud: [entra.microsoft.com](https://entra.microsoft.com) for Commercial and GCC, or [entra.microsoft.us](https://entra.microsoft.us) for GCC High. Navigate to '**Entra ID**' > '**App registrations**'. 2. Select '**New registration**' and complete the form: 1. In '**Name**', enter **eSHARE Classify SPO Columns**. 2. In '**Supported account types**', select '**Accounts in this organizational directory only**'. 3. Select the '**Register**' button. 3. On the app's '**Overview**' page, copy the '**Application (client) ID**' and the '**Directory (tenant) ID**'. 4. Navigate to '**Certificates & secrets**' > '**Certificates**' and select '**Upload certificate**'. 5. Choose the **eSHARE-Classify-SPO-Columns.cer** file from your user folder and select '**Add**'. Confirm that the thumbprint shown matches the one you copied. ### **Add the Permissions and Grant Consent** The app needs two application permissions: | API | Permission (Application) | Used by | | --- | --- | --- | | SharePoint | **Sites.FullControl.All** | Deploying the columns and site templates, and the inventory's search schema export | | Microsoft Graph | **Sites.Read.All** | The inventory's list of sites and columns | 1. In the app, navigate to '**API permissions**' and select '**Add a permission**'. 2. Select '**SharePoint**' > '**Application permissions**', check '**Sites.FullControl.All**' and select '**Add permissions**'. 3. Select '**Add a permission**' again, then '**Microsoft Graph**' > '**Application permissions**', check '**Sites.Read.All**' and select '**Add permissions**'. 4. Select '**Grant admin consent for [your organization]**' and confirm. Both permissions show the status '**Granted**'. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/CleanShot 2026-11-15 at 21.38.51@2x.png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A32%3A46Z&se=2026-11-18T21%3A32%3A46Z&sr=b&sp=r&sig=Ih%2BLJJMiv%2FqgiF5AXvlfnlVRspJSQD9UexAgnB0tUYw%3D) > [!WARNING] > Note: > > **Sites.FullControl.All** must be added under the **SharePoint** API. The Microsoft Graph permission of the same name doesn't cover the calls the scripts make. ### **Create the Tenant Configuration File** 1. Choose a folder name for your tenant inside **C:\eSHARE-Classification**, e.g. **Contoso**. The configuration file goes in this folder, and the scripts save their reports there. 2. In PowerShell 7, create the folder and open a new configuration file in Notepad. Select '**Yes**' when Notepad asks to create the file: ```powershell New-Item -ItemType Directory -Path C:\eSHARE-Classification\Contoso -Force | Out-Null notepad C:\eSHARE-Classification\Contoso\contoso.tenant.json ``` 1. Paste the version for your cloud into the file and replace the placeholders with your values. The only difference is the last line, '**Cloud**'; the scripts use it to connect to the right endpoints. ```json {  "TenantName": "contoso",  "TenantId": "",  "ClientId": "",  "CertificatePath": "",  "CertificateThumbprint": "",  "ProvisioningClientId": "",  "ProvisioningCertificatePath": "",  "ProvisioningCertificateThumbprint": "",  "Cloud": "Commercial" } ``` ```json {  "TenantName": "contoso",  "TenantId": "",  "ClientId": "",  "CertificatePath": "",  "CertificateThumbprint": "",  "ProvisioningClientId": "",  "ProvisioningCertificatePath": "",  "ProvisioningCertificateThumbprint": "",  "Cloud": "GCCHigh" } ``` 1. Use these values: - '**TenantName**': the part of your SharePoint address before **.sharepoint.com**, or **.sharepoint.us** in GCC High (*for https://contoso.sharepoint.us, enter contoso*). - '**ClientId**' and '**ProvisioningClientId**': the Application (client) ID, the same value in both. - '**CertificateThumbprint**' and '**ProvisioningCertificateThumbprint**': the certificate thumbprint, the same value in both. - '**Cloud**': **Commercial**, **GCC** (*GCC uses the commercial endpoints*) or **GCCHigh**. For DoD tenants, contact eSHARE support before you start. 2. Save the file. > [!WARNING] > Note: > > The file holds no secrets. On macOS or Linux, set '**CertificatePath**' and '**ProvisioningCertificatePath**' to the .pfx file (e.g. **~/Certs/eshare-classification.pfx**) and leave the thumbprints empty; the scripts ask for the .pfx password each time they run. ### **Test the Connection** 1. In a new PowerShell 7 window, connect to SharePoint and to Microsoft Graph as the app, using the version for your cloud. Replace the placeholders with your values: ```powershell Import-Module PnP.PowerShell $clientId = ""; $tenantId = ""; $thumb = "" Connect-PnPOnline -Url "https://contoso-admin.sharepoint.com" -ClientId $clientId -Tenant $tenantId -Thumbprint $thumb Get-PnPTenantSite | Select-Object -First 3 Url Connect-MgGraph -ClientId $clientId -TenantId $tenantId -CertificateThumbprint $thumb -NoWelcome Get-MgSite -SiteId root | Select-Object DisplayName, WebUrl ``` ```powershell Import-Module PnP.PowerShell $clientId = ""; $tenantId = ""; $thumb = "" Connect-PnPOnline -Url "https://contoso-admin.sharepoint.us" -AzureEnvironment USGovernmentHigh -ClientId $clientId -Tenant $tenantId -Thumbprint $thumb Get-PnPTenantSite | Select-Object -First 3 Url Connect-MgGraph -Environment USGov -ClientId $clientId -TenantId $tenantId -CertificateThumbprint $thumb -NoWelcome Get-MgSite -SiteId root | Select-Object DisplayName, WebUrl ``` 1. Confirm that both commands return site addresses from your tenant. An **Unauthorized** or **Access denied** error usually means admin consent hasn't been granted, or the permission was added under the wrong API. > [!WARNING] > Note: > > The certificate is valid for one year. Before it expires, create a new certificate, upload it to the app registration, and update the thumbprints in the tenant configuration file. ## Related - [Run the SharePoint Column Inventory](/run-the-sharepoint-column-inventory.md) - [Data Classification](/data-attributes.md) - [eSHARE Classify Overview](/eshare-classify-overview.md) - [eShare Classify](/eshare-classify.md) - [Data Classification Menu Installation Guide](/data-classification-menu-installation-guide.md) - [Configure Data Classification via Configuration File](/configure-data-attributes-via-configuration-file.md) - [Add the Classification Columns to New Sites](/eshare-classification-columns-on-new-sites.md)