MIM - Export all SecurityGroups and their members into CSV file RRS feed

  • Question

  • Hi,

    We have a requirement with one of our customers where we need to Export all SecurityGroups and their corresponding members into a CSV file. Not sure if that's possible in MIM or not. We do not have Reporting in scope so Reporting module not installed. Is there any way to achieve it through existing MIM capabilities or through Powershell or directly querying MIM DB's?

    I appreciate if someone can help me with this. Thanks.

    Regards, Chandan

    Wednesday, March 28, 2018 4:43 PM

All replies

  • You can accomplish this by querying the Sync Database. Two things to bear in mind 1) Microsoft says this isn't supported 2) If you do it right, you would incur locks and won't cause an issue.

    This can be done by running the following command

    Set Transaction Isolation Level ReadUncommitted

    or using (nolock) hints like so:

    SELECT GRP.displayName as GroupDisplayName
      , USR.displayName as UserDisplayName
    FROM dbo.mms_mv_link MEM WITH (NOLOCK)
    JOIN dbo.mms_metaverse GRP WITH (NOLOCK)        
      ON MEM.[object_id] = GRP.[object_ID] 
    JOIN dbo.mms_metaverse USR WITH (NOLOCK)        
      ON MEM.[reference_id] = USR.[object_ID]  
    WHERE GRP.[object_Type] ='group'
      AND GRP.[type] = 'Security'
      AND MEM.attribute_name = 'member'
    This query should work for you assuming you have flowed data similarly to this doc

    You may want to change it to grab the accountname instead of displayName

    David Lundell, Get your copy of FIM Best Practices Volume 1

    Sunday, April 1, 2018 4:49 AM
  • Hi David,

    Will surely check and update. Thanks for replying.

    Regards, Chandan

    Tuesday, April 3, 2018 5:44 AM