The purpose for this document is to guide someone through adding Group Managed Service Accounts (gMSA) into the MIM Portal. At my customer, we have started utilizing gMSA’s more and more as opposed to regular service accounts. With increased usage this means that gMSA’s are showing up as members of various Security Groups.
Anyone who has used MIM Portal extensively knows that when you add an unmanaged object to a managed object, MIM will strip out that unmanaged object when a sync happens. For example, in Active Directory, adding a gMSA to a MIM-managed Security group. The quick answer to this problem is to start managing the gMSA(s). Unfortunately, this is not a quick process to start managing the gMSA. There are a number of steps to complete this process. The tasks outlined below will walk you through how to manage gMSA’s in your MIM environment.
NOTE: Apologies in Task 4 and 5 concerning the images. I encountered some problems placing the images where I wanted to so I put them at the top of the section to not interfere with the ordered lists.
Task 1: Add msDS-GroupManagedServiceAccount to the MIM Portal Schema
- Launch the MIM Portal as a MIM Administrator.
- Click Administration from the Navigation pane.
- Click Schema Management.
- Stay on All Resources
- Click New
- In the System name field type msDS-GroupManagedServiceAccount
- In the Display name field type msDS-GroupManagedServiceAccount
- Click Finish
- Click Submit
- (Optional) Repeat Steps 5-9 for msDS-ManagedServiceAccount
- Click button for Bindings.
- Click New.
- Type msDS-GroupManagedServiceAccount in the Resource Type field.
- Click the Validate and Resolve button.
- Type AccountName in the Attribute Type field.
- Click the Validate and Resolve button.
- Click Finish and then Submit.
- Repeat Bindings steps for ObjectSid (attribute will resolve to Resource SID).
Task 2: Add msDS-GroupManagedServiceAccount as an object type to the FIM Management Agent
- Click Administration from the Navigation pane
- Click All Resources
- Click Next arrow (or type 2) in the lower right-hand corner
- Click Synchronization Filter
- Click Synchronization Filter
- Select the Extended Attributes tab.
- Add msDS-GroupManagedServiceAccount to the end of the list.
- (Optional) Add msDS-ManagedServiceAccount if needed.
- Click the Check button to validate and resolve.
- Click OK.
- If prompted, click Submit to confirm the changes being made.
Task 3: Add msDS-GroupManagedServiceAccount as an object type on the MIM Sync Server
- Open the Synchronization Service
- Select MetaVerse Designer from the ribbon menu
- From the Actions menu, click Create Object Type.
- In the Object type name field, type msDS-GroupManagedServiceAccount.
- Select the following attributes: accountname, cn, csObjectID, description, displayname, domain, objectSid.
- NOTE: If anyone of the attributes does not already exist, click the New attribute… button to create them.
- Type the name of the attribute
- Select the attribute type, String (indexable)
- Click OK.
- Click OK.



Task 4: Update the FIM Management Agent schema on the MIM Sync Server
- Open the Synchronization Service.
- Select the FIM Service Management Agent.
- From the Actions menu, click Refresh
- Click OK, to proceed with the refresh.
- Input the management agent service account password. Click OK.
- Once the schema has been updated, click Close.
- Run a Delta Import (if prompted to run a Full do so) followed by a Full Sync.
- Right-click the FIM Service Management Agent and select Properties.
- In the Management Agent Designer pane, click Select Object Types.
- In the Select Object Types pane, click Show All and select: msDS-GroupManagedServiceAccounts
- In the Management Agent Designer pane, click Select Object Type Mappings
- Select msDS-GroupManagedServiceAccounts
- Click Add Mapping and select msDS-GroupManagedServiceAccounts
- Click OK.
- In the Management Agent Designer pane, click Select Attribute Flow.
- In the Configure Attribute Flow pane, expand Object Type: msDS-GroupManagedServiceAccounts
- Make sure that AccountName to AccountName is setup as an Import and Export flow.
- Click OK at the bottom.
- (Optional) Repeat all necessary steps above in this task for msDS-ManagedServiceAccount
Task 5: Update the Active Directory Management Agent on the MIM Sync server

- Open the MIM Synchronization Service
- Select the Active Directory Management Agent, click Properties
- In the Management Agent Designer pane, click Select Object Types
- In the Select Object Types pane, click Show All and select:
- msDS-GroupManagedServiceAccount
- (Optional) msDS-ManagedServiceAccount
- In the Management Agent Designer pane, click Select Attributes
- In the Select Attributes pane, select (or Verify)
- CN
- Description
- Name
- sAMAccountName
- Click OK.
Task 6: In the MIM Portal, create an Inbound Sync Rule for the gMSA’s.



- Navigate to Adminsitration | Synchronization Rules
- Click New (See Image 1)
- Perform the following steps
- Type out a Display Name and Desscription
- Select Inbound
- Click Next.
- On the Scope tab do the following
- (See Image 2) Select msDS-GroupManagedServiceAccount for MetaVerse Resource Type
- Select “Active Directory Management Agent” for External System
- Select msDS-GroupManagedServiceAccount for External System Resource Type
- Click Next
- On the Relationship tab:
- Click Add Condition
- Select objectSID for the first and second drop-downs
- Click Next
- On the Inbound Attribute Flow tab:
- Click New Attribute Flow
- Add Description for the Source and Description for the Destination
- Click OK.
- Repeat for objectSID, sAMAccountName, cn, and name
- For name choose displayName as the Destination
- Lastly, for the domain, do the following:
- Select String for the Source and type the name of your domain in the blank field (e.g. Contoso). Select domain for the Destination.
- Click OK.
- Click Submit.
Task 7: In the MIM Portal, create a Set and MPR to give permission for the gMSA’s to be added to the MIM Portal when synchronizing
- Open the MIM Portal.
- Navigate to Sets
- Click New.
- Type in a Display Name, click Next.
- Where it reads “all resources”, change it to msDS-GroupManagedServiceAccount. Make no other modifications.
- Click Finish. Click Submit.
- Navigate to Management Policy Rules.
- Click New.
- Type in a Display Name, click Next.
- In the Specific Set of Requestors box, type Synchronization Engine. Click the Validate and Resolve button.
- In the Operation section, check the following box: Create resource.
- In the Permissions section, check the following box: Grants permission.
- Click Next.
- In the Target Resource Definition After Request field, type the Display Name of the Set that was created in Step 2. Click the Validate and Resolve button.
- Click Finish.
- Click Submit.
Perform all necessary Run Profiles (e.g. Delta Sync, Delta Import, Full Sync, Full Import, Export) to complete the process of bringing in the gMSA objects from AD into your Metaverse.