How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

How do I configure a managed object property to be required and not empty in IDM (All versions)?

Last updated Jan 12, 2023

The purpose of this article is to provide information on configuring a managed object property to be required and not empty in IDM. This configuration is used to prevent null values being permitted.

Configuring a managed object property

To make a managed object property both required and not empty, you can specify both the required and not-empty functions. These functions are available in the default policy script file (policy.js, located in the /path/to/idm/bin/defaults/script directory).


You can add a policies section to the required property in the managed.json file (located in the /path/to/idm/conf directory) with both these functions defined. For example, it would look like this for the city property:

"city" : { "type" : "string", "title" : "City", "description" : "City", "viewable" : true, "userEditable" : true, "usageDescription" : "", "isPersonal" : false, "policies" : [ { "policyId" : "required", "params" : { } }, { "policyId" : "not-empty", "params" : { } } ] }

This configuration ensures the city property is always present and contains an actual value when creating or updating objects.

See Also

Administering and configuring IDM

Use Policies to Validate Data

Policy Configuration Element

Related Training


Related Issue Tracker IDs


Copyright and Trademarks Copyright © 2023 ForgeRock, all rights reserved.