Forum Discussion

mrktos's avatar
mrktos
Brass Contributor
Sep 04, 2019

Azure AD - Powershell getting AD Group of Source Cloud

Hey Everyone,

I am trying to find out if it is possible to get an AAD group of Source Cloud only using Powershell? Get-AzADGroup does not look like it sis giving this capability and after getting one of the groups I cannot see any property that will match the Group Source type. Would you be able to help?

 

Wojtek

  • Hi Wojtek,

     

    using PoSh you can filter on the attributes 

    LastDirSyncTime
    DirSyncEnabled

    to get the cloud created groups.

    A direct filter on the source is only available in the GUI, but this only offers "Windows server AD" at the moment.

    One suggestion in PoSh:

    Get-AzureADGroup -All $true | where-Object {$_.DirSyncEnabled -like ""}

     

  • Hi Wojtek,

     

    using PoSh you can filter on the attributes 

    LastDirSyncTime
    DirSyncEnabled

    to get the cloud created groups.

    A direct filter on the source is only available in the GUI, but this only offers "Windows server AD" at the moment.

    One suggestion in PoSh:

    Get-AzureADGroup -All $true | where-Object {$_.DirSyncEnabled -like ""}

     

    • mrktos's avatar
      mrktos
      Brass Contributor
      Great, thanky ou for the tips. This is what I was looking for.

Resources