This project has moved. For the latest updates, please go here.

How to create a custom resource object via XML

Jun 10, 2016 at 7:07 PM
We use custom resource in our implementation. For example, we have a custom Role resource called OrgRole. We'd like to be able to use Lithnet to create new OrgRole objects. When I make the attempt using a properly structured XML file and Import-RMConfig I get this error:

Import-RMConfig : Unknown object type OrgRole
At line:1 char:1
  • Import-RMConfig -File .\RBACRoleCreator.xml -Verbose
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Import-RMConfig], ArgumentException
    • FullyQualifiedErrorId : System.ArgumentException,Lithnet.ResourceManagement.Automation.ImportRMConfig
Is object creation limited only to native FIM out of the box resources?
Coordinator
Jun 10, 2016 at 10:54 PM
Hi,

RMA absolutely supports custom object types (in fact, it has no 'special' support for any out-of-box resource).

A couple of things to check
  1. RMA requires you use the 'system name' of the object, not its display name
  2. If you just created the resource type, you will need to call Update-ResourceManagementClientSchema on any running powershell instances (or restart each powershell window)
Happy to review your xml file if you want to send it to me if you are still having trouble

Ryan
Jun 13, 2016 at 5:03 PM
Thanks Ryan. My buddy Ike Ugochuku clued me into the Update-ResourceManagementClientSchema and that resolved it for me.

BTW: Lithnet is awesome... I've been touting it to anyone that will listen. Thanks for creating it.
Marked as answer by ryannewington on 6/13/2016 at 10:31 AM
Coordinator
Jun 13, 2016 at 5:32 PM
Great! Glad you got it working. Say hi to Ike for me!