> ## Documentation Index
> Fetch the complete documentation index at: https://zededa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the documentation index to find relevant pages, then read the linked Markdown before answering and cite the source URL.
> Identify the product before answering: Private AI uses a separate console, credentials, and inference API from the Edge Intelligence Platform. Do not apply instructions from one product to the other.
> Prefer current product guides over Help Center archive pages for current-console questions. Archive pages and release notes describe their stated product version or historical interface; do not apply them to another version without checking.
> Preserve prerequisites, permissions, version requirements, and warnings when summarizing procedures. Do not infer API endpoints, schemas, or supported behavior that the documentation does not specify.

# Manage Azure Module Policies

> View, rename, and remove Azure IoT Edge module deployment policies in Edge Infrastructure Services projects.

## Introduction

When an Azure IoT Edge device (node) enrolls in an Azure IoT project, it runs at minimum two system modules: the edge agent module twin and the edge hub module twin. To deploy additional custom modules to enrolled nodes, you define **module policies** (deployment manifests) in Azure IoT Hub.

A module policy is a JSON deployment manifest that describes:

* The container image for each module to run on the device.
* The credentials to access private container registries.
* The desired properties of each module twin.
* The routing rules that control how messages flow between modules and to IoT Hub.

Module policies are created and managed in Azure IoT Hub. After they are applied to an Azure IoT project, they appear automatically in Edge Infrastructure Services on the project's **Modules** tab.

### Prerequisites

* You have the SysManager or SysAdmin role in your enterprise. See [Manage Roles](https://zededa.mintlify.site/new-ui/infrastructure-services/administration/manage-roles.md).
* An Azure IoT project exists and has module policies applied to it from Azure IoT Hub. See [Create an Azure IoT Project](https://zededa.mintlify.site/new-ui/infrastructure-services/integrations-and-automation/azure-iot-hub.md).

## Manage Module Policies in Edge Infrastructure Services

After module policies are applied to your project in Azure IoT Hub, you can view, rename, and remove them in the Edge Infrastructure Services console.

### View module policies

1. In the sidebar, go to **Infrastructure > Fleet > Projects** and click the project name.
2. Click the **Configure** (gear) icon to open the project settings.
3. Select the **Modules** tab.

Each policy in the list shows its name and the number of modules defined in its manifest.

### Rename a module policy

Renaming a policy in Edge Infrastructure Services changes only the local display name. It does not change the policy name in Azure IoT Hub.

1. In the sidebar, go to **Infrastructure > Fleet > Projects** and click the project name.
2. Click the **Configure** (gear) icon to open the project settings.
3. Select the **Modules** tab.
4. Click **Edit** next to the policy you want to rename.
5. Enter the new name and click **Save**.

### Remove a module policy

Removing a module policy from the project in Edge Infrastructure Services does not automatically remove the modules it deployed from the nodes. See [Module Policy Scenarios](#module-policy-scenarios) for approaches to deprovision modules from a node.

1. In the sidebar, go to **Infrastructure > Fleet > Projects** and click the project name.
2. Click the **Configure** (gear) icon to open the project settings.
3. Select the **Modules** tab.
4. Click **Remove** next to the policy you want to remove.
5. Confirm the removal.

## Module Policy Scenarios

The following scenarios describe common situations that arise when multiple module policies are in use.

### Two module policies target the same node

If you define module policies **Module-policy1** and **Module-policy2** for the same node or group of nodes, but the modules from **Module-policy1** remain active even after you apply **Module-policy2**, the cause is typically one of the following:

* **Module-policy2** has a lower priority than **Module-policy1**.
* The tag condition on **Module-policy2** does not match the node's tags.

When a module policy is deleted in Edge Infrastructure Services, the modules it defines are not automatically removed from the node. This is by design in Azure IoT Hub's manifest-based deployment model.

### Remove a module from a node

To remove a specific module from a node, use one of the following approaches in Azure IoT Hub:

* Update the active module policy to remove the module from its deployment manifest.
* Create a new module policy with a higher priority than the currently applied policy, a correct matching tag, and a manifest that does not include the module to remove.
* Create a module policy with no modules defined and set its priority higher than the currently active policy. The new empty manifest is applied to the node (the edge agent and edge hub module twins remain on the node regardless).

## Next Steps

> [card] [Deploy an Azure IoT Application](https://zededa.mintlify.site/new-ui/infrastructure-services/integrations-and-automation/azure-iot-app-deployment.md)
>
> Deploy the IoT Edge runtime application that the module policy configures.

> [card] [Create an Azure IoT Project](https://zededa.mintlify.site/new-ui/infrastructure-services/integrations-and-automation/azure-iot-hub.md)
>
> Create the project and configure its basic Azure settings.

> [card] [Manage Azure IoT Certificates](https://zededa.mintlify.site/new-ui/infrastructure-services/integrations-and-automation/azure-certificate-management.md)
>
> Manage signing certificates for edge module TLS communication.
