---
title: DeclaredConfiguration CSP
description: Learn more about the DeclaredConfiguration CSP.
ms.date: 01/18/2024
---
# DeclaredConfiguration CSP
[!INCLUDE [Windows Insider tip](includes/mdm-insider-csp-note.md)]
The primary MDM model is one where the MDM server is solely responsible for orchestration and continuous maintenance of the state of the device for configuration scenarios. This behavior results in intensive network traffic and high network latency due to the synchronous configuration model based on the OMA-DM Syncml standard. It's also error-prone given that the server needs deep knowledge of the client.
The declared configuration device management model requires the server to deliver all the setting values to the device for the scenario configuration. The server sends them asynchronously in batches through the client declared configuration CSP.
- During the client-initiated OMA-DM session, the declared configuration server sends a configuration or an inventory declared configuration document to the client through the [Declared Configuration CSP URI](#declared-configuration-oma-uri). If the device verifies the syntax of the document is correct, the client stack pushes the request to its orchestrator to process the request asynchronously. The client stack then exits, and returns control back to the declared configuration service. This behavior allows the device to asynchronously process the request.
- On the client, if there are any requests in process or completed, it sends a [generic alert](#declared-configuration-generic-alert) to the server. This alert summarizes each document's status, state, and progress. Every client HTTPS request to the declared configuration OMA-DM server includes this summary.
- The declared configuration server uses the generic alert to determine which requests are completed successfully or with errors. The server can then synchronously retrieve the declared configuration document process results through the [Declared Configuration CSP URI](#declared-configuration-oma-uri).
The following list shows the DeclaredConfiguration configuration service provider nodes:
- ./Device/Vendor/MSFT/DeclaredConfiguration
- [Host](#host)
- [Complete](#hostcomplete)
- [Documents](#hostcompletedocuments)
- [{DocID}](#hostcompletedocumentsdocid)
- [Document](#hostcompletedocumentsdociddocument)
- [Properties](#hostcompletedocumentsdocidproperties)
- [Abandoned](#hostcompletedocumentsdocidpropertiesabandoned)
- [Results](#hostcompleteresults)
- [{DocID}](#hostcompleteresultsdocid)
- [Document](#hostcompleteresultsdociddocument)
- [Inventory](#hostinventory)
- [Documents](#hostinventorydocuments)
- [{DocID}](#hostinventorydocumentsdocid)
- [Document](#hostinventorydocumentsdociddocument)
- [Results](#hostinventoryresults)
- [{DocID}](#hostinventoryresultsdocid)
- [Document](#hostinventoryresultsdociddocument)
## Host
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host
```
The Host internal node indicates that the target of the configuration request or inventory request is the host OS. This node is for scope in case enclaves are ever targeted for configuration.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Add, Delete, Get |
### Host/Complete
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete
```
This internal node indicates that the configuration has discrete settings values and is self-contained with complete setting and value pairs that don't contain placeholders that need to be resolved later with additional data. The request is ready to be processed as is.
The server to client flow of the **Complete** request is the same as an **Inventory** request.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Add, Delete, Get |
#### Host/Complete/Documents
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents
```
The Documents node indicates that the configuration is in the form of a document, which is a collection of settings used to configure a scenario by the Declared Configuration stack.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Add, Delete, Get |
##### Host/Complete/Documents/{DocID}
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents/{DocID}
```
Uniquely identifies the configuration document. No other document can have this id. The Id should be a GUID.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Add, Delete, Get |
| Dynamic Node Naming | ServerGeneratedUniqueIdentifier |
| Allowed Values | Regular Expression: `[0-9A-Fa-f]{8}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{12}` |
###### Host/Complete/Documents/{DocID}/Document
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents/{DocID}/Document
```
The Document node's value is an XML based document containing a collection of settings and values to configure the specified scenario. The Declared Configuration stack verifies the syntax of the document, the stack marks the document to be processed asynchronously by the client. The stack then returns control back to the OMA-DM service. The stack, in turn, asynchronously processes the request. Below is an example of a specified desired state configuration using the Declared Configuration URI ./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents/27FEA311-68. B9-4320-9. FC4-296. F6FDFAFE2/Document.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Add, Delete, Get, Replace |
###### Host/Complete/Documents/{DocID}/Properties
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents/{DocID}/Properties
```
The Properties node encapsulates the list of properties that apply to the specified document referenced by [DocID].
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Add, Delete, Get |
###### Host/Complete/Documents/{DocID}/Properties/Abandoned
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents/{DocID}/Properties/Abandoned
```
The Abandoned node allows the OMA-DM server to indicate that the document is no longer managed.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Add, Delete, Get, Replace |
| Default Value | 0 |
**Allowed values**:
| Value | Description |
|:--|:--|
| 0 (Default) | The document is no longer managed. |
| 1 | The document is managed. |
#### Host/Complete/Results
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Results
```
The Results node indicates that this is part of the URI path that will return an XML document containing the results of the configuration request.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Get |
##### Host/Complete/Results/{DocID}
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Results/{DocID}
```
Uniquely identifies the configuration document in which results of the configuration request will be returned.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Get |
| Dynamic Node Naming | ClientInventory |
###### Host/Complete/Results/{DocID}/Document
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Results/{DocID}/Document
```
The Document node's value is an XML based document containing a collection of setting results from the configuration request specified by [DocId].
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Get |
### Host/Inventory
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory
```
The Inventory internal node indicates that this is an inventory request. The setting values to be retrieved are specified in an XML document through the Document leaf node.
The server to client flow of the **Inventory** request is the same as the **Complete** request.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Add, Delete, Get |
#### Host/Inventory/Documents
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory/Documents
```
The Documents node indicates that the inventory request is in the form of a document, which is a collection of settings used to retrieve their values.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Add, Delete, Get |
##### Host/Inventory/Documents/{DocID}
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory/Documents/{DocID}
```
Uniquely identifies the inventory document. No other document can have this id. The Id should be a GUID.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Add, Delete, Get |
| Dynamic Node Naming | ServerGeneratedUniqueIdentifier |
| Allowed Values | Regular Expression: `[0-9A-Fa-f]{8}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{12}` |
###### Host/Inventory/Documents/{DocID}/Document
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory/Documents/{DocID}/Document
```
The Document node's value is an XML based document containing a collection of settings that will be used to retrieve their values. The Declared Configuration stack verifies the syntax of the document, the stack marks the document to be processed asynchronously by the client. The stack then returns control back to the OMA-DM service. The stack, in turn, asynchronously processes the request. Below is an example of a specified desired state configuration using the Declared Configuration URI ./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory/Documents/27FEA311-68. B9-4320-9. FC4-296. F6FDFAFE2/Document.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Add, Delete, Get, Replace |
#### Host/Inventory/Results
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory/Results
```
The Results node indicates that this is part of the URI path that will return an XML document containing the results of the inventory request.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Get |
##### Host/Inventory/Results/{DocID}
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory/Results/{DocID}
```
Uniquely identifies the inventory document. No other document can have this id. The Id should be a GUID.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Get |
| Dynamic Node Naming | ClientInventory |
###### Host/Inventory/Results/{DocID}/Document
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device ❌ User | ✅ Pro ✅ Enterprise ✅ Education ✅ Windows SE ✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory/Results/{DocID}/Document
```
The Document node's value is an XML based document containing a collection of setting results from the inventory request specified by [DocId].
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Get |
## Declared configuration OMA URI
A declared configuration request is sent using an OMA-URI similar to `./Device/Vendor/MSFT/DeclaredConfiguration/Host/[Complete|Inventory]/Documents/{DocID}/Document`.
- The URI is prefixed with a targeted scope. The target of the scenario settings can only be device wide for extensibility. The scope should be `Device`.
- `{DocID}` is a unique identifier for the desired state of the configuration scenario. Every document must have an ID, which must be a GUID.
- The request can be a **Configuration**, **Inventory**, or **Complete** request.
The following URI is an example of a **Complete** request: `./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents/27FEA311-68B9-4320-9FC4-296F6FDFAFE2/Document`
## DeclaredConfiguration document XML
The value of the leaf node `Document` is an XML document that describes the request. The actual processing of the request pivots around the `osdefinedscenario` tag:
- `MSFTExtensibilityMIProviderConfig`: Used to configure MI provider settings.
- `MSFTExtensibilityMIProviderInventory`: Used to retrieve MI provider setting values.
The DeclaredConfiguration CSP synchronously validates the batch of settings described by the `` element, which represents the declared configuration document. It checks for correct syntax based on the declared configuration XML schema. If there's a syntax error, the CSP returns an error immediately back to the server as part of the current OMA-DM session. If the syntax check passes, then the request is passed on to a Windows service. The Windows service asynchronously attempts the desired state configuration of the specified scenario. This process frees up the server to do other work thus the low latency of this declared configuration protocol. The Windows client service, the orchestrator, is responsible for driving the configuration of the device based on the server supplied desire state. The service also maintains this state throughout its lifetime, until the server removes or modifies it.
The following example uses the built-in, native MI provider `MSFT_FileDirectoryConfiguration` with the OS-defined scenario `MSFTExtensibilityMIProviderConfig`:
```xml
c:\data\test\bin\ut_extensibility.tmpTestFileContentBlah
```
The standard OMA-DM SyncML syntax is used to specify the DeclaredConfiguration CSP operations such as **Replace**, **Set**, and **Delete**. The payload of the SyncML's `` element must be XML-encoded. For this XML encoding, there are various online encoders that you can use. To avoid encoding the payload, you can use [CDATA Section](https://www.w3.org/TR/REC-xml/#sec-cdata-sect) as shown in the following example:
```xml
14 ./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents/99988660-9080-3433-96e8-f32e85011999/Documentc:\data\test\bin\ut_extensibility.tmpTestFileContentBlah]]>
```
### DeclaredConfiguration XML document tags
Both `MSFTExtensibilityMIProviderConfig` and `MSFTExtensibilityMIProviderInventory` are OS-defined scenarios that require the same tags and attributes.
- The `` XML tag specifies the details of the declared configuration document to process. The document could be part of a configuration request or an inventory request. The DeclaredConfiguration CSP has two URIs to allow the specification of a configuration or an inventory request.
This tag has the following attributes:
| Attribute | Description |
|--|--|
| `schema` | The schema version of the xml. Currently `1.0`. |
| `context` | States that this document is targeting the device. The value should be `Device`. |
| `id` | The unique identifier of the document set by the server. This value should be a GUID. |
| `checksum` | This value is the server-supplied version of the document. |
| `osdefinedscenario` | The named scenario that the client should configure with the given configuration data. For extensibility, the scenario is either `MSFTExtensibilityMIProviderConfig` or `MSFTExtensibilityMIProviderInventory`. |
- The `` XML tag describes the targeted WMI provider expressed by a namespace and class name along with the values either to be applied to the device or queried by the MI provider.
This tag has the following attributes:
| Attribute | Description |
|--|--|
| `namespace` | Specifies the targeted MI provider namespace. |
| `classname` | The targeted MI provider. |
- The `` XML tag describes the required parameter name and value. It only needs a value for configuration. The name is an attribute and the value is `` content.
This tag has the following attributes:
| Attribute | Description |
|--|--|
| `name` | Specifies the name of an MI provider parameter. |
- The `` XML tag describes the optional parameter name and value. It only needs a value for configuration. The name is an attribute and the value is `` content.
This tag has the following attributes:
| Attribute | Description |
|--|--|
| `name` | Specifies the name of an MI provider parameter. |
## Declared configuration generic alert
On every client response to the server's request, the client constructs a declared configuration alert. This alert summarizes the state of each of the documents that the Windows service has processed. The following XML is an example alert:
```xml
1
1224
com.microsoft.mdm.declaredconfigurationdocuments
```
In this example, there's one declared configuration document listed in the alert summary. The alert summary lists every document that the client stack is processing, either a configuration or inventory request. It describes the context of the document that specifies the scope of how the document is applied. The **context** value should be `Device`.
The **state** attribute has a value of `60`, which indicates that the document was processed successfully. The following class defines the other state values:
```csharp
enum class DCCSPURIState :unsigned long
{
NotDefined = 0, // transient
ConfigRequest = 1, // transient
ConfigInprogress = 2, // transient
ConfigInProgressAsyncPending = 3, // transient: Async operation is performed but pending results
DeleteRequest = 10, // transient
DeleteInprogress = 11, // transient
GetRequest = 20, // transient
GetInprogress = 21, // transient
ConstructURIStorageSuccess = 40, // transient
ConfigCompletedSuccess = 60, // permanent
ConfigCompletedError = 61, // permanent
ConfigInfraError = 62, // permanent
ConfigCompletedSuccessNoRefresh = 63, // permanent
DeleteCompletedSuccess = 70, // permanent
DeleteCompletedError = 71, // permanent
DeleteInfraError = 72, // permanent
GetCompletedSuccess = 80, // permanent
GetCompletedError = 81, // permanent
GetInfraError = 82 // permanent
};
```
## SyncML examples
- Retrieve the results of a configuration or inventory request:
```xml
2chrtext/plain./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Results/27FEA311-68B9-4320-9FC4-296F6FDFAFE2/Document
```
```xml
212Get
200
312./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Results/27FEA311-68B9-4320-9FC4-296F6FDFAFE2/Document
```
- Replace a configuration or inventory request
```xml
14./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory/Documents/27FEA311-68B9-4320-9FC4-296F6FDFAFE2/Documentc:/temp/foobar.tmp]]>
```
```xml
212Get
200
312./Device/Vendor/MSFT/DeclaredConfiguration/Host/Inventory/Results/99998660-9080-3433-96e8-f32e85019999/Documentc:/temp/foobar.tmpTestFileContent
```
- Abandon a configuration or inventory request. This process results in the client tracking the document but not reapplying it. The alert has the `Abandoned` property set to `1`, which indicates that the document is no longer managed by the declared configuration server.
```xml
2inttext/plain./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents/27FEA311-68B9-4320-9FC4-296F6FDFAFE2/Properties/Abandoned
1
```
- Deletion of configuration or inventory request. The SyncML deletion of the document only removes the document but any extensibility settings persist on the device (tattoo).
```xml
2./Device/Vendor/MSFT/DeclaredConfiguration/Host/Complete/Documents/27FEA311-68B9-4320-9FC4-296F6FDFAFE2/Document
```
## Related articles
[Configuration service provider reference](configuration-service-provider-reference.md)