Secardeo certEntra Azure Deployment Guide

1 Introduction

1.1 Purpose of this document

This guide describes the deployment of the Secardeo certEntra software as an Azure App Service in Microsoft Azure. It serves as a guideline for planning, deploying, configuring, and operating certEntra.

Alternatively, certEntra can also be installed on a Windows Server using a provided executable installer. This deployment model is not covered in this document and is described separately in the certEntra Manual Deployment Guide. For more information, please contact Secardeo at info@secardeo.com.

1.2 Functions and architecture

certEntra allows for the central autoenrollment of digital user certificates in the Azure cloud. Typical use cases are

  • end-to-end e-mail encryption and signing using S/MIME certificates from a public CA or
  • certificate based authentication (CBA) of the user

certEntra uses Microsoft Entra ID groups to manage access to the web interface and for the certificate enrollment. Certificates are automatically distributed to the user's devices through Intune. Figure 1 shows the certEntra architecture and its components.

certEntra is deployed as an Azure App Service and uses an SQL database in Azure SQL, MS SQL or MySQL. certEntra communicates with Entra ID to retrieve user information that are required for the issuance of certificates. certEntra authenticates itself through an App Registration in Microsoft Entra ID.

For the storage of credentials and keys, certEntra uses an Azure Key Vault. Issued certificates can be automatically published to your organizational Exchange Online GAL or a Secardeo certBox for seamless end-to-end encryption.

Figure 1: certEntra architecture
Figure 1: certEntra architecture
2 Prerequisites

2.1 Backend CA

For the issuance of digital certificates, a Certificate Authority (CA) is required. certEntra supports different Backend CAs. This can be a private CA or a trusted public CA. Currently the following CAs are supported:

  • AWS ACM-PCA
  • DigiCert CertCentral
  • DogTag CA
  • D-Trust
  • EJBCA
  • GlobalSign Atlas
  • GlobalTrust SOAP
  • OpenXPKI
  • Sectigo Certificate Manager (SCM) REST
  • Secardeo certVault CA
  • SwissSign CMC
  • Windows CA HTTP
  • TOPKI REST Please make sure that you prepare the following information for your selected CA:
  • required API credentials
  • certificate products and profiles

2.2 Application package URL

To deploy certEntra, you require a URL containing the application package from Secardeo. The URL will be required as a parameter in later deployment steps.

If you haven't received the URL yet, please contact info@secardeo.com.

2.3 Database requirements

certEntra stores relevant information about certificates, requests, and configurations in a database. A database connection is always required for certEntra to function. certEntra supports the following database types:

Managed:

  • Azure SQL (recommended)
  • DTU-based purchasing model, Standard tier, DTU set to minimum
  • Azure Database for MySQL

Self-hosted:

  • Microsoft SQL Server 2016 or higher
  • MySQL v9 or higher

Make sure that the storage of the database is sufficient. The database requires ~100 KB per certificate.

certEntra supports SQL authentication for all database types. Entra authentication is preferred, but only configurable for managed Azure SQL.

If you do not have a database server yet, you can create a managed SQL server according to the descriptions in chapter 5.3.4.

2.4 License

certEntra follows a bring-your-own license (BYOL) model. Upon installation, a 90-day demo license is automatically applied for trial usage. To use certEntra productively, a valid license must be provided for continued use.

To obtain a serial number for the license, please contact info@secardeo.com. After receiving your serial number, follow the steps described in the certEntra manual to install and activate your license.

2.5 Azure permissions

The certEntra deployment consists of two steps: starting the deployment in Azure through the marketplace and running a deployment script. Both steps should be performed by a user with the following permissions:

Azure:

The user needs one of the following permissions on the target resource group or subscription:

  • Owner, or
  • Contributor plus User Access Administrator

Microsoft Entra ID:

  • Global Administrator, or
  • Privileged Role Administrator

Exchange Online:

  • Global Administrator, or
  • Exchange Administrator

These permissions are only needed for the deployment and the setup script, not for configuring certEntra as described in the manual.

3 Azure Marketplace deployment

3.1 Starting the deployment

Complete the deployment in the following order:

1. Sign in to the Azure portal as the deploying user. The user must have the permissions described in chapter 2.5.

2. Open the Azure Marketplace and search for certEntra. Select the plan "certEntra" and your subscription and click "Create".

3. Complete the deployment by entering the information described in the following chapters. Required fields are marked with the "*" symbol.

3.2 Basics

The first page contains the general Azure deployment settings:

Field Description
Subscription Select the subscription where certEntra should be deployed.
Resource group Select or create an empty resource group in your subscription. All resources required for certEntra will be created there.
Region Select the region where your resources should be created
Web app name Globally unique, 2 to 60 letters, digits or hyphens. certEntra will be reachable over <name>.azurewebsites.net. The names of the other resources are derived from it.
Application URL You should receive this value from Secardeo before deployment. If you have not received the URL yet, please contact info@secardeo.com.
Figure 2: Marketplace basics
Figure 2: Marketplace basics

3.3 Advanced settings

The settings on this page are optional and can be skipped for a basic deployment.

Customize plan and network

Field Description Default
App Service Plan Create a new Windows plan or use an existing one in the same subscription and region. New plan
App Service pricing tier Select a pricing tier for the App Service plan with which certEntra should be deployed. This can be changed later. Recommendations are described in appendix A). B1
Network integration You can select whether to create a new VNet or if certEntra should use an existing VNet. No VNet integration

Configure custom domain

The deployed certEntra web app automatically receives a default domain name in the shape of <name>.azurewebsites.net. If you want to configure a different domain name such as certEntra.contoso.com, you can configure it in the field "Custom domain name". Before running the deployment script, you must set the following DNS tokens at your DNS provider. The exact values can be taken from the outputs of the deployment after you finish the deployment. The values are available in the attribute "customDomainDns":

Type Name Value
CNAME certentra.contoso.com The Web App's default hostname (cnameRecordValue, e.g. <app>.azurewebsites.net)
TXT asuid.certentra.contoso.com The Web App's domain verification ID (txtRecordValue)

Enable Application Insights

Application Insights can be used for additional application monitoring like performance or error tracking.

Customize role groups

By default, certEntra will create the required groups during the deployment. You can modify the names with which the groups will be created. If groups with these names already exist, the existing groups will be used.

Field Description Default
Administrator Group Users of this group will be able to log into the certEntra administration interface. certEntra-<web-app-name>-Administrators
KRA Group Users of this group will be able to recover archived private keys of all users. certEntra-<web-app-name>-KRA

3.4 Start the deployment

The page "After the deployment" shows the PowerShell command that will be required to complete the deployment. You can copy the command and press on "Review + Create" and "Create" to start the deployment.

After the deployment is completed (after about 5-10 minutes), you will need to continue with the copied command in chapter 5.

If you did not copy the command, you can find it after the deployment under Deployment -> Outputs in the value setupCommand.

4 Terraform Deployment

Terraform deploys the Azure infrastructure required by certEntra. After the infrastructure deployment, a separate PowerShell script completes the configuration of the administrator and KRA groups, app registration, credentials, and required permissions.

4.1 Prepare the Terraform package

Use a Windows PowerShell session with Terraform 1.5 or later and the Azure CLI installed. The deploying user must have the permissions described in chapter 2.5.

Verify the Terraform installation, sign in to Azure, and select the target subscription:

 terraform version
az login
az account list --output table
az account set --subscription "<subscription-name-or-id>"
az account show 

Download and extract the certEntra Terraform deployment package:

 Invoke-WebRequest -Uri "https://secardeo.blob.core.windows.net/certentra/certEntra-Terraform.zip" -OutFile "certEntra-Terraform.zip"
Expand-Archive -Path ".\certEntra-Terraform.zip" -DestinationPath ".\certEntra-Terraform"
Set-Location ".\certEntra-Terraform" 

Open terraform.tfvars and configure the deployment. The file contains the basic configuration, advanced settings, and instructions for completing the setup.

4.2 Basic configuration

Configure the following values in the Basics section of terraform.tfvars:

 location = "<location>"
resource_group_name = "<resource-group-name>"
web_app_name = "<globally-unique-web-app-name>"
application_package_url = "<https-package-url-from-secardeo>" 
Setting Description
location Azure region in which the resources will be created.
resource_group_name Name of the resource group Terraform will create for this deployment.
web_app-name Globally unique name containing 2-60 letters, digits, or hyphens. It must begin and end with a letter or digit.
application_package_url HTTPS URL of the certEntra application package supplied by Secardeo.. If you have not received the URL yet, please contact info@secardeo.com.

To list the available Azure regions, run:

 az account list-locations --output table 

The Key Vault and other resource names are generated automatically. Terraform uses a Premium Key Vault. Optional name overrides are available in the configuration, but are not required for a standard deployment.

4.3 Advanced settings

The advanced settings are optional. The defaults create a new Windows App Service plan with SKU B1, without VNet integration or a custom domain. Change the settings required for your environment.

Customize plan and network

App Service plan

By default, Terraform creates a new Windows App Service plan:

 use_existing_app_service_plan = false
app_service_sku = "B1" 

The supported pricing tiers for a new plan are B1, P0v3, and P1v3. Use B1 for testing and evaluation. Refer to Appendix A) for production sizing recommendations.

To use an existing App Service plan, configure:

 use_existing_app_service_plan = true
existing_app_service_plan_resource_id = "/subscriptions/<subscription-id>/resourceGroups/<plan-resource-group>/providers/Microsoft.Web/serverfarms/<plan-name>" 

The existing plan must:

  • Host Windows applications on a dedicated Basic or higher tier.
  • Belong to the same subscription and region as the deployment.
  • Be located outside the resource group created by this Terraform deployment.

Terraform does not change the pricing tier or capacity of an existing plan. The app_service_sku and app_service_plan_name settings apply only when creating a new plan.

Network integration

For a deployment without VNet integration, leave:

 network_mode = "None" 

To create a dedicated VNet, configure:

 network_mode = "Create"
vnet_address_space = "10.250.0.0/16" 

Choose an address space that does not overlap with networks to which the VNet will connect. Terraform derives a /26 App Service integration subnet from this address space and generates the resource names automatically.

To integrate with an existing VNet, configure:

 network_mode = "Existing"
existing_app_service_subnet_resource_id = "/subscriptions/<subscription-id>/resourceGroups/<network-resource-group>/providers/Microsoft.Network/virtualNetworks/<vnet-name>/subnets/<subnet-name>" 

The subnet must be delegated to Microsoft.Web/serverFarms and belong to the same subscription and region as the deployment.

VNet integration provides outbound connectivity from certEntra, for example to a private database or backend CA. Public HTTPS access to the Web App remains enabled. This deployment does not create private endpoints or VPN connections.

Configure custom domain

By default, certEntra uses the hostname <web-app-name>.azurewebsites.net.

To configure a custom domain, enter a public subdomain without https:// or a path:

 custom_domain_name = "certentra.contoso.com" 

After Terraform completes, display the required DNS records:

 terraform output customDomainDns 

Create the CNAME and asuid TXT records at your DNS provider using the displayed values.

Once the DNS records are available, run the completion script. The script configures the custom hostname, managed HTTPS certificate, and Entra sign-in and sign-out URLs.

If DNS is not ready, the script reports the remaining DNS tasks. Complete them and run the script again.

Enable Application Insights

certEntra logging uses Azure Monitor resources created during deployment.

To additionally enable Application Insights, configure:

 enable_application_insights = true 

The default is false. When enabled, Terraform creates an Application Insights resource linked to the deployment's Log Analytics workspace.

Application Insights telemetry requires an Enterprise or demo license.

Customize role groups

The completion script creates or reuses the following security groups:

Role Default group name
Administrators certEntra-<web-app-name>-Administrators
Key Recovery Agents certEntra-<web-app-name>-KRA

To use different group names, configure:

 administrator_group_name = "Contoso certEntra Administrators"
kra_group_name = "Contoso certEntra KRA" 

Leave either value empty to use its default name. These Terraform settings accept group names, not object IDs.

By default, the completion script may create a group if it does not exist:

 create_administrator_group_if_missing = true
create_kra_group_if_missing = true 

Set the corresponding value to false if an existing group must be used. The completion script then stops if that group cannot be found.

Group lookup and creation take place when the completion script runs. The script does not change group membership. Add the relevant users to the administrator and KRA groups manually.

Groups containing users for certificate enrollment remain customer-managed and must be created separately.

4.4 Run Terraform

Run the following commands from the extracted Terraform package directory:

 terraform init
terraform validate
terraform plan -out certentra.tfplan 

Review the plan and verify the target subscription, resource names, region, and selected options.

Apply the reviewed plan:

 terraform apply certentra.tfplan 

Wait for Terraform to complete before proceeding.

5 Complete the setup

The deployment creates the Azure resources of certEntra. The separate PowerShell script creates the following:

  • the administrator and KRA groups
  • the app registration and enterprise application
  • the API permissions and admin consent
  • the client secret, which is stored in the Key Vault
  • the Azure role assignments of the application
  • the Exchange Online configuration

Run the script once after the deployment, as a user with the permissions described in chapter 2.5. It is safe to run it again: it reuses existing objects and repairs only what is missing. Appendix C) lists the tasks of the script.

5.1 Run the setup script

1. You must run the PowerShell script on a machine where the Azure CLI is installed. You can also use the Azure Cloud Shell for this (https://shell.azure.com/powershell).

2. Run the following command. For more advanced deployment options, please refer to chapter 5.2 before running the command.

 Invoke-WebRequest https://secardeo.blob.core.windows.net/certentra/Complete-CertEntraSetup.ps1 -OutFile Complete-CertEntraSetup.ps1
./Complete-CertEntraSetup.ps1 -WebAppName <web-app-name> 

3. The script shows its progress and ends with a summary of what is still required.

After completing all steps, you can access certEntra at the URL that is shown in the output of the script. The configuration of certEntra is described in the certEntra manual. The following information should be prepared to configure certEntra:

1. The connection parameters for the backend CA (FQDN of CA server and CA credentials)

2. For setting up the database connection:

a. FQDN or IP of the SQL server

b. The corresponding port of the SQL server

c. The database name

d. Credentials for accessing the database (username and password; user must have read and write permissions)

3. Optional: For e-mail notifications (Exchange Online):

a. Permissions for the app registration

b. E-mail address of originator and recipient (operator)

4. Optional: For e-mail notifications (SMTP):

a. DNS name of the mail server

b. E-mail address of originator and recipient (operator)

c. Optional: username and password for mail server authentication

d. Depending on the SMTP server the firewalls must allow the port 25, 465 or 587. Please check with your mail server administrator for the correct port

e. Consider for each certificate status, who should receive an e-mail regarding the status change

5.2 Groups and app registration

The following groups are used by certEntra. The groups are automatically created by the deployment script unless a group with the configured group exists already. You will have to manually add the relevant users to these groups.

Additionally, you will need a group containing the users for which certEntra should enroll certificates. This group must be created manually

Group Default name
Administrators certEntra-<web-app-name>-Administrators
Key Recovery Agents certEntra-<web-app-name>-KRA

During the deployment of certEntra, an app registration is generated automatically with the name "certEntra - <web-app-name>". If you want to manually grant the app registration permissions, you can follow these steps:

1. Run the setup script with -SkipAdminConsent.

2. A Global Administrator or Privileged Role Administrator grants consent:

a. Open Microsoft Entra ID -> App registrations.

b. Select certEntra-<web-app-name>.

c. Open API permissions and select Grant admin consent for <tenant>.

3. Run the same command again, still with -SkipAdminConsent. The script checks the consent, validates the client secret, configures Exchange Online and completes the setup.

This app registration is given the following permissions:

API Permission Type
Intune pfx_cert_provider Application
Microsoft Graph DeviceManagementConfiguration.ReadWrite.All Application
Microsoft Graph DeviceManagementManagedDevices.Read.All Application
Microsoft Graph Directory.Read.All Application
Microsoft Graph Group.Read.All Application
Microsoft Graph GroupMember.Read.All Application
Microsoft Graph User.Read.All Application
Microsoft Graph MailboxSettings.Read Application
Microsoft Graph Mail.Send Application
Microsoft Graph User.Read Delegated
Office 365 Exchange Online Exchange.ManageAsApp Application

The application's enterprise application is also assigned these Azure roles:

Role Scope
Monitoring Metrics Publisher certEntra resource group
Web Plan Contributor certEntra resource group
Website Contributor certEntra resource group
Log Analytics Reader certEntra Log Analytics workspace

The certEntra app registration is also given permission to access Exchange Online to identify members of shared mailboxes and to publish certificates to your GAL. If you do not want certEntra to have these permissions, you can add the parameter -SkipExchangeConfiguration to the setup script.

5.3 Optional configuration

5.3.1 Custom domain name

The deployed certEntra web app automatically receives a default domain name. To configure a custom domain name, please refer to the Microsoft documentation:

https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain

Please make sure you have the necessary rights at your DNS provider for your custom domain name.

5.3.2 Enable Application Insights

During deployment, certEntra automatically provisions the required Azure Monitor resources for centralized logging, including the Log Analytics workspace and related data collection resources.

If Application Insights should be used for additional application monitoring, it must be enabled manually in the Azure portal after the deployment has completed. To do this:

  • Open the Azure portal, search for "App Services" and select your certEntra Web App
  • Open "Monitoring" -> "Application Insights"
  • Select "Enable"
  • Under "Change your resource", select "Create new resource"
  • Enter a resource name for the new Application Insights resource
  • Select the Log Analytics Workspace that was created during the certEntra deployment
  • Press "Apply"

5.3.3 Disable automatic software updates

Per default, certEntra automatically updates itself to the newest released version.

If you want to disable the automatic software update, please contact support@secardeo.com.

5.3.4 Configuration of a new database server

certEntra requires an SQL database (see chapter 2.3). If you do not have an existing database server, you can use the following descriptions to create a new one.

5.3.4.1 Create database server

certEntra requires a database server. There are different options for deploying the database:

  • Managed (recommended): Deploy a fully managed database server in Azure (e.g. Azure SQL or Azure Database for MySQL). This is recommended for production use due to easier maintenance, backups and high availability
  • Self-hosted: You can use your own existing database server (for example, an on-premises MS SQL Server or MySQL server that you manage) If you choose the Managed option and don't have an already existing database server yet, we suggest to create one in your Azure Tenant. You can choose between Azure SQL or MySQL.
5.3.4.1.1 Create managed Azure SQL server

1. In the Azure portal, search for "SQL servers" in the top search bar.

2. Click "Create" and enter a globally unique server name, such as "topki-sqlserver".

3. Under "Basics -> Authentication method", choose the option that fits your setup:

a. "Use Microsoft Entra-only authentication" (see5.3.4.3)

b. "Use both SQL and Microsoft Entra authentication", or

c. "Use SQL authentication"

Note: SQL authentication is often easier to configure, however Microsoft Entra authentication is recommended

4. Please decide the database administrator. Configure the "Microsoft Entra admin" and/or "Instance admin login" depending on the selection of the "Authentication method".

a. If you want to use SQL authentication, you must create a new user with a password that will be set as the administrator of the database. Please remember the credentials of the "Instance admin login" to create an additional database user for certEntra. This is required in the database configuration step in the certEntra manual.

b. If you choose "Microsoft Entra authentication", you must configure an Entra ID account that will be set as the administrator of the database server. If you want to configure Entra authentication as a login option, you must be able to login as the "Microsoft Entra admin" at the database server.

5. In the "Networking" tab, toggle "Allow Azure services and resources to access this server" to "Yes".

6. In the "Security" tab, you don't need to configure anything

7. Configure the rest of the attributes according to your needs or leave them with the default

8. Click "Review + Create" and "Create"

9. After the database server is deployed, click on the database server. Go to "Security" -> "Networking" and configure the networking. The database server must be accessible from the certEntra web app and also in step5.3.4.3, if you want to use Entra authentication.

5.3.4.1.2 Create managed MySQL server

1. Go to your Azure portal and search for "Azure Database for MySQL servers".

2. Click "Create" and enter a server name, e.g. "TOPKI".

3. For "Authentication method", choose at least "Use SQL authentication". certEntra does not support Microsoft Entra authentication for MySQL databases.

4. Configure a "Server admin login" and password. This is the database administrator. Please remember the credentials. They are required in the database configuration step in the certEntra manual.

5. In the "Networking" tab toggle "Allow Azure services and resources to access this server" to "Yes".

6. Configure the rest of the attributes according to your needs or leave the with the default.

5.3.4.2 Database network configuration
5.3.4.2.1 Private endpoint

To connect certEntra with the database, the database must be integrated into the virtual network using a private endpoint.

1. In the Azure portal, open your SQL server

2. Navigate to "Security"->"Networking"

3. Select the "Private access" tab and click "Create a private endpoint"

Figure 3: Create a private endpoint
Figure 3: Create a private endpoint

4. In the "Basics" tab:

a. Select the correct subscription and the certEntra resource group

b. "Name": Provide a name (e.g. pe-certentra-sql)

c. "Region": select the region of the certEntra resource group

d. Click "Next: Resource"

5. In the "Resource" tab:

a. "Target sub-resource": "sqlServer"

b. Click "Next: Virtual Network"

6. In the "Virtual Network" tab:

a. "Virtual network": Select the vnet-certentra virtual network created by the ARM template or Terraform deployment

b. "Subnet": select the subnet-private-endpoints subnet created by the ARM template or Terraform deployment

c. Click "Next: DNS"

7. In the "DNS" tab:

a. Integrate with private DNS zone: select "Yes"

8. Click "Next: Tags", "Next: Review + create" and "Create" to create the private endpoint

5.3.4.2.2 Public endpoint (additionally required for Entra authentication)

Under "Security - Networking - Public access - Firewall rules" click "Add your client IP address". Press "Save". (You can remove this after the deployment is finished)

5.3.4.3 Configure Entra authentication for Azure SQL (Recommended)

certEntra can connect to Azure SQL databases using Entra Authentication via the app registration. Alternatively you can use SQL authentication to connect to the previously configured DB server. For this, the app registration user has to be created with proper permissions on the database server. For more information, please refer to the Microsoft documentation.

1. Go to the Azure portal to "Enterprise applications" -> "All applications"

2. Select the app registration configured

3. Copy the "Object ID"

4. Go in the Azure portal to "Azure SQL" and select the Azure SQL database server to get the "Microsoft Entra admin" account

5. Login to the database server as the "Microsoft Entra admin". You can use "Microsoft SQL Server Management Studio"

6. Create the external user for the app registration on the database server based on the "Object ID":

 CREATE USER [<name-of-app-registration>]
FROM EXTERNAL PROVIDER
WITH OBJECT_ID = '<object-id>';
GO
ALTER ROLE dbmanager ADD MEMBER [<name-of-app-registration>];
ALTER ROLE loginmanager ADD MEMBER [<name-of-app-registration>]; 

Note:

The "[" and "]" symbols are required and must not be removed.

7. You can validate that the user was successfully created:

 SELECT name, type_desc, authentication_type_desc
FROM sys.database_principals
WHERE type IN ('E', 'X')
AND name = '<name-of-app-registration>'; 
6 Contact

Secardeo GmbH
Hohenadlstr. 4
D-85737 Ismaning
Germany
E-Mail: support@secardeo.com
Phone: +49 89 18 93 58 9-8

7 Appendix

A) Platform requirements

The target environment must meet the following technical requirements.

Web App Requirements:

  • B1 for testing and evaluation purposes
  • P0v3 for production use with up to 1000 active certificates,
  • P1v3 for production use with > 1000 users/active certificates

You can change the scaling later. Generally, it is not required to configure multiple instances for certEntra. During the initial rollout, you might want to increase the sizing of the plan to speed up the enrollment and you can decrease it afterwards.

B) ARM template resources

The following resources are created by the ARM template:

Type Description
Microsoft.Network/virtualNetworks Only with "Create a dedicated VNet": a VNet with one /26 subnet delegated to Microsoft.Web/serverFarms for the Web App's VNet integration
Microsoft.KeyVault/vaults The Key Vault, with Azure RBAC authorization and 90-day soft delete. It stores the application credentials and certEntra's certificate and key material.
Microsoft.Web/serverfarms Creates the Azure App Service plan for the certEntra Web App
Microsoft.Web/sites Creates the Azure Web App with a system-assigned managed identity and basic site configuration
Microsoft.Web/sites/networkConfig Configures VNet integration for the Web App by connecting it to the delegated subnet
Microsoft.OperationalInsights/workspaces The Log Analytics workspace for certEntra logging, with 30-day retention.
Microsoft.OperationalInsights/workspaces/tables The custom table certEntraLogs_CL for application log records
Microsoft.Insights/dataCollectionEndpoints Creates the data collection endpoint used for log ingestion
Microsoft.Insights/dataCollectionRules Creates the data collection rule that maps the custom log stream into the Log Analytics workspace
Microsoft.Authorization/roleAssignments Key Vault Administrator on the Key Vault, for the Web App's managed identity.

The template does not create Microsoft Entra ID objects or the application's credentials and role assignments. The setup script creates them (see Appendix D)).

C) Deployment Script

The deployment script completes the following steps:

1. Checks the signed-in tenant, the subscription and the required permissions.

2. Temporarily assigns the operator the Key Vault Administrator role on the certEntra Key Vault. It removes this assignment when it finishes, also after errors.

3. Creates the administrator and KRA groups or uses existing groups with the selected names. It does not change group membership.

4. Creates or reuses the app registration certEntra - <web-app-name> and the corresponding enterprise application.

5. Configures the sign-in and sign-out URLs, the security group claims and the API permissions. It grants admin consent, unless -SkipAdminConsent is used.

6. Assigns the application's Azure roles.

7. Creates a client secret and stores it in the Key Vault, or reuses a valid existing secret.

8. Configures Exchange Online access, unless it is disabled.

9. Restarts the Web App if needed, checks that it responds, and shows a summary with the remaining tasks.

D) Marketplace template resources

The following resources are created by the Marketplace deployment:

Type Description
Microsoft.Network/virtualNetworks Creates the virtual network for the deployment, including a delegated subnet for App Service VNet integration and a separate subnet for private endpoints
Microsoft.KeyVault/vaults Creates the Azure Key Vault used to store deployment secrets and certificate-related values
Microsoft.Web/serverfarms Creates the Azure App Service plan for the certEntra Web App
Microsoft.Web/sites Creates the Azure Web App with a system-assigned managed identity and basic site configuration
Microsoft.Web/sites/networkConfig Configures VNet integration for the Web App by connecting it to the delegated subnet
Microsoft.KeyVault/vaults/secrets Creates Key Vault secrets for AzureAd- ClientId, Azure--ClientSecret and AzureAd- TenantId based on the manually provided app registration values
Microsoft.OperationalInsights/workspaces Creates the Log Analytics workspace used for certEntra logging
Microsoft.OperationalInsights/workspaces/tables Creates the custom Log Analytics table certEntraLogs_CL for application log records
Microsoft.Insights/dataCollectionEndpoints Creates the data collection endpoint used for log ingestion
Microsoft.Insights/dataCollectionRules Creates the data collection rule that maps the custom log stream into the Log Analytics workspace
Microsoft.Authorization/roleAssignments Assigns Azure roles required by the deployment. The roles are: Key Vault Certificates Officer on the Key Vault for the deployment identity, Monitoring Metrics Publisher, Web Plan Contributor and Website Contributor on the resource group for the app registration service principal, Key Vault Secrets User for the Web App identity, and Log Analytics Reader on the workspace

E) Setup script parameters

All parameters are optional.

Parameter Purpose
-SkipAdminConsent Prepares the app registration and declares its API permissions without granting admin consent. Use this when another administrator grants consent.
-EnableMailNotifications Adds the Microsoft Graph permission Mail.Send, for e-mail notifications through Exchange Online.
-AdministratorGroup <name or object ID>, -KRAGroup <name or object ID> Uses the given existing group instead of the group selected during the deployment.
-NoGroupCreation Uses existing groups only. The script stops instead of creating a group.
-ApplicationId <client ID> Uses an existing app registration
-RotateClientSecret Creates a new client secret
-SecretValidityDays <1-730> Lifetime of a new client secret in days. Default: 365. Tenant policies may restrict it.
-WhatIf Shows the planned changes without making them.