Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-M365DSCDeltaReport compares two groups with the same display name, causes differences to show up with identical configs #4921

Closed
cstringham opened this issue Jul 23, 2024 · 0 comments · Fixed by #4931 or #4944

Comments

@cstringham
Copy link

Description of the issue

There are two groups in the environment where I am using this module, and they have the same display name but distinct IDs. When I run the New-M365DSCDeltaReport command to compare two configurations, even if the configurations are completely identical, deltas show up saying that the first group with the shared display name in the config is changing to the second group with the shared display name in the config.

Microsoft 365 DSC Version

V1.24.717.1

Which workloads are affected

Azure Active Directory (Entra ID)

The DSC configuration

Source
-----------
# Generated with Microsoft365DSC version 1.24.717.1
# For additional information on how to use Microsoft365DSC, please visit https://aka.ms/M365DSC
param (
)

Configuration Customer1
{
    param (
    )

    $OrganizationName = $ConfigurationData.NonNodeData.OrganizationName

    Import-DscResource -ModuleName 'Microsoft365DSC' -ModuleVersion '1.24.717.1'

    Node localhost
    {
        AADGroup "AADGroup-Group1"
        {
            ApplicationId        = $ConfigurationData.NonNodeData.ApplicationId;
            ApplicationSecret    = New-Object System.Management.Automation.PSCredential ('ApplicationSecret', (ConvertTo-SecureString $ConfigurationData.NonNodeData.ApplicationSecret -AsPlainText -Force));
            Description          = "TestGroup";
            DisplayName          = "TestGroup";
            Ensure               = "Present";
            GroupTypes           = @("Unified");
            Id                   = "93490934-f565-4dc5-a44c-12d22f0b729c";
            MailEnabled          = $True;
            MailNickname         = "TEST123";
            MemberOf             = @();
            Members              = @();
            Owners               = @("[email protected]");
            SecurityEnabled      = $False;
            TenantId             = $OrganizationName;
            Visibility           = "Public";
        }
        AADGroup "AADGroup-Group2"
        {
            ApplicationId        = $ConfigurationData.NonNodeData.ApplicationId;
            ApplicationSecret    = New-Object System.Management.Automation.PSCredential ('ApplicationSecret', (ConvertTo-SecureString $ConfigurationData.NonNodeData.ApplicationSecret -AsPlainText -Force));
            Description          = "TestGroup";
            DisplayName          = "TestGroup";
            Ensure               = "Present";
            GroupTypes           = @("Unified");
            Id                   = "cefc0143-af71-4ddb-b149-ce4828ed6b77";
            MailEnabled          = $True;
            MailNickname         = "TEST";
            MemberOf             = @();
            Members              = @("[email protected]");
            Owners               = @("[email protected]");
            SecurityEnabled      = $False;
            TenantId             = $OrganizationName;
            Visibility           = "Private";
        }
    }
}

Customer1 -ConfigurationData .\ConfigurationData.psd1



Destination
-----------
# Generated with Microsoft365DSC version 1.24.717.1
# For additional information on how to use Microsoft365DSC, please visit https://aka.ms/M365DSC
param (
)

Configuration Customer1
{
    param (
    )

    $OrganizationName = $ConfigurationData.NonNodeData.OrganizationName

    Import-DscResource -ModuleName 'Microsoft365DSC' -ModuleVersion '1.24.717.1'

    Node localhost
    {
        AADGroup "AADGroup-Group1"
        {
            ApplicationId        = $ConfigurationData.NonNodeData.ApplicationId;
            ApplicationSecret    = New-Object System.Management.Automation.PSCredential ('ApplicationSecret', (ConvertTo-SecureString $ConfigurationData.NonNodeData.ApplicationSecret -AsPlainText -Force));
            Description          = "TestGroup";
            DisplayName          = "TestGroup";
            Ensure               = "Present";
            GroupTypes           = @("Unified");
            Id                   = "93490934-f565-4dc5-a44c-12d22f0b729c";
            MailEnabled          = $True;
            MailNickname         = "TEST123";
            MemberOf             = @();
            Members              = @();
            Owners               = @("[email protected]");
            SecurityEnabled      = $False;
            TenantId             = $OrganizationName;
            Visibility           = "Public";
        }
        AADGroup "AADGroup-Group2"
        {
            ApplicationId        = $ConfigurationData.NonNodeData.ApplicationId;
            ApplicationSecret    = New-Object System.Management.Automation.PSCredential ('ApplicationSecret', (ConvertTo-SecureString $ConfigurationData.NonNodeData.ApplicationSecret -AsPlainText -Force));
            Description          = "TestGroup";
            DisplayName          = "TestGroup";
            Ensure               = "Present";
            GroupTypes           = @("Unified");
            Id                   = "cefc0143-af71-4ddb-b149-ce4828ed6b77";
            MailEnabled          = $True;
            MailNickname         = "TEST";
            MemberOf             = @();
            Members              = @("[email protected]");
            Owners               = @("[email protected]");
            SecurityEnabled      = $False;
            TenantId             = $OrganizationName;
            Visibility           = "Private";
        }
    }
}

Customer1 -ConfigurationData .\ConfigurationData.psd1

Verbose logs showing the problem

[
    {
        "ResourceName":  "AADGroup",
        "Key":  "DisplayName",
        "KeyValue":  "TestGroup",
        "Properties":  [
                           {
                               "ValueInDestination":  "93490934-f565-4dc5-a44c-12d22f0b729c",
                               "ParameterName":  "Id",
                               "ValueInSource":  "cefc0143-af71-4ddb-b149-ce4828ed6b77"
                           }
                       ],
        "ResourceInstanceName":  "AADGroup-Group1"
    },
    {
        "ResourceName":  "AADGroup",
        "Key":  "DisplayName",
        "KeyValue":  "TestGroup",
        "Properties":  [
                           {
                               "ValueInDestination":  [
                                                          "[email protected]"
                                                      ],
                               "ParameterName":  "Owners",
                               "ValueInSource":  [
                                                     "[email protected]"
                                                 ]
                           }
                       ],
        "ResourceInstanceName":  "AADGroup-Group1"
    },
    {
        "ResourceName":  "AADGroup",
        "Key":  "DisplayName",
        "KeyValue":  "TestGroup",
        "Properties":  [
                           {
                               "ValueInDestination":  [

                                                      ],
                               "ParameterName":  "Members",
                               "ValueInSource":  [
                                                     "[email protected]"
                                                 ]
                           }
                       ],
        "ResourceInstanceName":  "AADGroup-Group1"
    },
    {
        "ResourceName":  "AADGroup",
        "Key":  "DisplayName",
        "KeyValue":  "TestGroup",
        "Properties":  [
                           {
                               "ValueInDestination":  "Public",
                               "ParameterName":  "Visibility",
                               "ValueInSource":  "Private"
                           }
                       ],
        "ResourceInstanceName":  "AADGroup-Group1"
    },
    {
        "ResourceName":  "AADGroup",
        "Key":  "DisplayName",
        "KeyValue":  "TestGroup",
        "Properties":  [
                           {
                               "ValueInDestination":  "TEST123",
                               "ParameterName":  "MailNickname",
                               "ValueInSource":  "TEST"
                           }
                       ],
        "ResourceInstanceName":  "AADGroup-Group1"
    }
]

Environment Information + PowerShell Version

OsName               : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Name                           Value
----                           -----
PSVersion                      5.1.22621.3880
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.3880
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant