--- title: NodeCache CSP description: Learn more about the NodeCache CSP. ms.date: 01/18/2024 --- # NodeCache CSP The NodeCache configuration service provider is used to manage the client cache. This configuration service provider is to be used only by enterprise management servers. It provides a level of abstraction that decouples the management of the node list from a specific backing store. It synchronizes the client cache with the server side cache. It also provides an API for monitoring device-side cache changes. NodeCache supports the comparison of hash values instead of actual node values: ```xml application/x-nodemon-sha256 ``` NodeCache will hash the values and compare with a hash value that was sent down by the server. This process supports checking a parent node and its children recursively. The following list shows the NodeCache configuration service provider nodes: - ./Device/Vendor/MSFT/NodeCache - [{ProviderID}](#deviceproviderid) - [CacheVersion](#deviceprovideridcacheversion) - [ChangedNodes](#deviceprovideridchangednodes) - [ChangedNodesData](#deviceprovideridchangednodesdata) - [Nodes](#deviceprovideridnodes) - [{NodeID}](#deviceprovideridnodesnodeid) - [AutoSetExpectedValue](#deviceprovideridnodesnodeidautosetexpectedvalue) - [ExpectedValue](#deviceprovideridnodesnodeidexpectedvalue) - [NodeURI](#deviceprovideridnodesnodeidnodeuri) - ./User/Vendor/MSFT/NodeCache - [{ProviderID}](#userproviderid) - [CacheVersion](#userprovideridcacheversion) - [ChangedNodes](#userprovideridchangednodes) - [ChangedNodesData](#userprovideridchangednodesdata) - [Nodes](#userprovideridnodes) - [{NodeID}](#userprovideridnodesnodeid) - [AutoSetExpectedValue](#userprovideridnodesnodeidautosetexpectedvalue) - [ExpectedValue](#userprovideridnodesnodeidexpectedvalue) - [NodeURI](#userprovideridnodesnodeidnodeuri) ## Device/{ProviderID} | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later | ```Device ./Device/Vendor/MSFT/NodeCache/{ProviderID} ``` Group settings per DM server. Each group of settings is distinguished by the server's Provider ID. It should be the same DM server PROVIDER-ID value that was supplied through the [w7 APPLICATION](w7-application-csp.md) configuration service provider XML during the enrollment process. In Windows Phone 8, only one enterprise management server is supported. That is, there should be only one ProviderID node under NodeCache. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `node` | | Access Type | Add, Delete, Get | | Dynamic Node Naming | UniqueName: It should be the same DM server PROVIDER-ID value that was supplied through the w7 APPLICATION configuration service provider XML during the enrollment process. | ### Device/{ProviderID}/CacheVersion | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later | ```Device ./Device/Vendor/MSFT/NodeCache/{ProviderID}/CacheVersion ``` Character string representing the cache version set by the server. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `chr` (string) | | Access Type | Add, Get, Replace | ### Device/{ProviderID}/ChangedNodes | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later | ```Device ./Device/Vendor/MSFT/NodeCache/{ProviderID}/ChangedNodes ``` List of nodes whose values don't match their expected values as specified in /NodeID/ExpectedValue. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `chr` (string) | | Access Type | Get | ### Device/{ProviderID}/ChangedNodesData | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```Device ./Device/Vendor/MSFT/NodeCache/{ProviderID}/ChangedNodesData ``` XML containing nodes whose values don't match their expected values as specified in /NodeID/ExpectedValue. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `xml` | | Access Type | Get | ### Device/{ProviderID}/Nodes | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later | ```Device ./Device/Vendor/MSFT/NodeCache/{ProviderID}/Nodes ``` Root node for cached nodes. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `node` | | Access Type | Get | #### Device/{ProviderID}/Nodes/{NodeID} | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later | ```Device ./Device/Vendor/MSFT/NodeCache/{ProviderID}/Nodes/{NodeID} ``` Information about each cached node is stored under NodeID as specified by the server. This value mustn't contain a comma. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `node` | | Access Type | Add, Delete, Get | | Dynamic Node Naming | ServerGeneratedUniqueIdentifier | ##### Device/{ProviderID}/Nodes/{NodeID}/AutoSetExpectedValue | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```Device ./Device/Vendor/MSFT/NodeCache/{ProviderID}/Nodes/{NodeID}/AutoSetExpectedValue ``` This will automatically set the value on the device to match the node's actual value. The node is specified in NodeURI. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `null` | | Access Type | Add, Delete, Get | ##### Device/{ProviderID}/Nodes/{NodeID}/ExpectedValue | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later | ```Device ./Device/Vendor/MSFT/NodeCache/{ProviderID}/Nodes/{NodeID}/ExpectedValue ``` This is the value that the server expects to be on the device. When the configuration service provider initiates a session, it checks the expected value against the node's actual value. Supported values are string and x-nodemon-nonexistent. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `chr` (string) | | Access Type | Add, Delete, Get | **Example**: Here's an example for setting the ExpectedValue to nonexistent. ```xml 10 ./Device/Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0002/ExpectedValue chr application/x-nodemon-nonexistent ``` ##### Device/{ProviderID}/Nodes/{NodeID}/NodeURI | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later | ```Device ./Device/Vendor/MSFT/NodeCache/{ProviderID}/Nodes/{NodeID}/NodeURI ``` This node's value is a complete OMA DM node URI. It can specify either an interior or leaf node in the device management tree. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `chr` (string) | | Access Type | Add, Delete, Get | ## User/{ProviderID} | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```User ./User/Vendor/MSFT/NodeCache/{ProviderID} ``` Group settings per DM server. Each group of settings is distinguished by the server's Provider ID. It should be the same DM server PROVIDER-ID value that was supplied through the [w7 APPLICATION](w7-application-csp.md) configuration service provider XML during the enrollment process. In Windows Phone 8, only one enterprise management server is supported. That is, there should be only one ProviderID node under NodeCache. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `node` | | Access Type | Add, Delete, Get | | Dynamic Node Naming | UniqueName: It should be the same DM server PROVIDER-ID value that was supplied through the w7 APPLICATION configuration service provider XML during the enrollment process. | ### User/{ProviderID}/CacheVersion | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```User ./User/Vendor/MSFT/NodeCache/{ProviderID}/CacheVersion ``` Character string representing the cache version set by the server. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `chr` (string) | | Access Type | Add, Get, Replace | ### User/{ProviderID}/ChangedNodes | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```User ./User/Vendor/MSFT/NodeCache/{ProviderID}/ChangedNodes ``` List of nodes whose values don't match their expected values as specified in /NodeID/ExpectedValue. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `chr` (string) | | Access Type | Get | ### User/{ProviderID}/ChangedNodesData | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```User ./User/Vendor/MSFT/NodeCache/{ProviderID}/ChangedNodesData ``` XML containing nodes whose values don't match their expected values as specified in /NodeID/ExpectedValue. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `xml` | | Access Type | Get | ### User/{ProviderID}/Nodes | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```User ./User/Vendor/MSFT/NodeCache/{ProviderID}/Nodes ``` Root node for cached nodes. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `node` | | Access Type | Get | #### User/{ProviderID}/Nodes/{NodeID} | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```User ./User/Vendor/MSFT/NodeCache/{ProviderID}/Nodes/{NodeID} ``` Information about each cached node is stored under NodeID as specified by the server. This value mustn't contain a comma. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `node` | | Access Type | Add, Delete, Get | | Dynamic Node Naming | ServerGeneratedUniqueIdentifier | ##### User/{ProviderID}/Nodes/{NodeID}/AutoSetExpectedValue | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```User ./User/Vendor/MSFT/NodeCache/{ProviderID}/Nodes/{NodeID}/AutoSetExpectedValue ``` This will automatically set the value on the device to match the node's actual value. The node is specified in NodeURI. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `null` | | Access Type | Add, Delete, Get | ##### User/{ProviderID}/Nodes/{NodeID}/ExpectedValue | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```User ./User/Vendor/MSFT/NodeCache/{ProviderID}/Nodes/{NodeID}/ExpectedValue ``` This is the value that the server expects to be on the device. When the configuration service provider initiates a session, it checks the expected value against the node's actual value. Supported values are string and x-nodemon-nonexistent. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `chr` (string) | | Access Type | Add, Delete, Get | **Example**: Here's an example for setting the ExpectedValue to nonexistent. ```xml 10 ./User/Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0002/ExpectedValue chr application/x-nodemon-nonexistent ``` ##### User/{ProviderID}/Nodes/{NodeID}/NodeURI | Scope | Editions | Applicable OS | |:--|:--|:--| | ✅ Device
✅ User | ✅ Pro
✅ Enterprise
✅ Education
✅ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later | ```User ./User/Vendor/MSFT/NodeCache/{ProviderID}/Nodes/{NodeID}/NodeURI ``` This node's value is a complete OMA DM node URI. It can specify either an interior or leaf node in the device management tree. **Description framework properties**: | Property name | Property value | |:--|:--| | Format | `chr` (string) | | Access Type | Add, Delete, Get | ## A typical DM session with the NodeCache configuration service provider 1. The device connects to a DM server. 2. The server queries the **NodeCache** version by issuing a Get operation for ./Vendor/MSFT/NodeCache/*ProviderID*/CacheVersion LocURI 3. If the device **CacheVersion** and the server-side cache differ (due to a device crash or server crash), the server can clear the server-side cache and go to Step 5. 4. The server updates the server-side cache: 1. Sends a Get operation for ./Vendor/MSFT/NodeCache/*ProviderID*/ChangedNodes LocURI 2. Response is a list of changed node IDs. Each ID in the list corresponds to a node under ./Vendor/MSFT/NodeCache/*ProviderID*/Nodes root 3. For each node in the invalid nodes list, the server sends a `GET` command to retrieve the actual value of the node. For example, `GET `, where `NodeURI` is a full device LocURI that corresponds to the invalid cache node. 4. Nodes in the server-side cache are updated with the actual values received from the device. 5. For each updated node, a `REPLACE` command is sent to the device to update the device-side cache: `REPLACE ./Vendor/MSFT/NodeCache/ProviderID/Nodes/NodeID/ExpectedValue => ActualValue` 6. A new cache version is created and sent to the device: `REPLACE ./Vendor/MSFT/NodeCache/ProviderID/CacheVersion => new_version` The `new_version` value is stored by the server. 5. The management server retrieves the corresponding value from the server-side cache: 1. If a value already exists in the server-side cache, retrieve the value from the server-side cache instead of going to the device. 2. If a value doesn't exist in the server-side cache, do the following tasks: 1. Create a new entry with a unique *NodeID* in the server-side cache. 2. Query the device to retrieve the actual value of the URI. 3. Create a new node under ./Vendor/MSFT/NodeCache/*ProviderID*/Nodes with *NodeID* value. 4. Set up **NodeURI** and **ExpectedValue** for the ./Vendor/MSFT/NodeCache/*ProviderID*/Nodes/*NodeID* node. 5. Update the **CachedNodes** version. ## OMA DM examples Creating settings for node caching: ```xml 2 ./Vendor/MSFT/NodeCache/MDMSRV1 node 4 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0001 node 5 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0001/NodeURI ./Vendor/MSFT/DeviceLock/Provider/MDMSRV1/DevicePasswordEnabled 6 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0001/ExpectedValue 0 8 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0002 node 9 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0002/NodeURI ./Vendor/MSFT/DeviceLock/Provider/MDMSRV1/AlphanumericDevicePasswordRequired 10 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0002/ExpectedValue 0 ``` Getting nodes under Provider ID MDMSRV1, cache version, changed nodes, node, expected value: ```xml 18 ./Vendor/MSFT/NodeCache/MDMSRV1 19 ./Vendor/MSFT/NodeCache/MDMSRV1/CacheVersion 20 ./Vendor/MSFT/NodeCache/MDMSRV1/ChangedNodes 21 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0001 22 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0001/ExpectedValue ``` Replacing the cache version, node URI, and expected value: ```xml 2 ./Vendor/MSFT/NodeCache/MDMSRV1/CacheVersion SCCM0001@!Replace 2 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0001/NodeURI ./Vendor/MSFT/DeviceLock/DeviceValue/AllowSimpleDevicePassword 2 ./Vendor/MSFT/NodeCache/MDMSRV1/Nodes/Node_0001/ExpectedValue 2 ``` For AutoSetExpectedValue, a Replace operation with empty data will query the ./DevDetail/Ext/Microsoft/DeviceName. ```xml 2001 ./Vendor/MSFT/NodeCache/MDM%20SyncML%20Server/Nodes/20 node 2002 ./Vendor/MSFT/NodeCache/MDM%20SyncML%20Server/Nodes/20/NodeURI ./DevDetail/Ext/Microsoft/DeviceName 2003 ./Vendor/MSFT/NodeCache/MDM%20SyncML%20Server/Nodes/20/AutoSetExpectedValue ``` A Get operation on `./Vendor/MSFT/NodeCache/MDM%20SyncML%20Server/Nodes/20/ExpectedValue` returns what the Device Name was when the AutoSet was called. A Get operation on the ChangedNodesData returns an encoded XML. Here's an example: ```xml U09NRU5FV1ZBTFVF ``` It represents this example: ```xml U09NRU5FV1ZBTFVF ``` Id is the node ID that was added by the MDM server, and Uri is the path that the node is tracking. If a Uri is not set, the node will always be reported as changed, as in Node ID 10. The value inside of the node tag is the actual value returned by the Uri, which means that for Node ID 20 the DeviceName did not match what was previously expected, and the device name is now U09NRU5FV1ZBTFVF instead of what it was previously. ## Related articles [Configuration service provider reference](configuration-service-provider-reference.md)