Giter Site home page Giter Site logo

Comments (5)

andikrueger avatar andikrueger commented on September 13, 2024

Could you please share some more information about the issue and how we can reproduce on our end?

from microsoft365dsc.

eriel369 avatar eriel369 commented on September 13, 2024

is there a ' in the displayname of the group ? I have had this issue with apostrophes.

from microsoft365dsc.

kevin14389 avatar kevin14389 commented on September 13, 2024

No, we have no ' in the displayname, just an hyphen.

How to reproduce this problem :

  • We export all the group
  • We manually change the DisabledPlans when the AssignedLicences is not null in the previous created .PS1 file
  • We save the .ps1 file
  • We execute the .ps1 file to create the .mof
  • We apply the new .mof file with Start-DscConfiguration -Path Folder Created With Previous Step

This was working perfectly before.

from microsoft365dsc.

sp74fg2 avatar sp74fg2 commented on September 13, 2024

I was a bit impatient and ignored the warnings from the test run (hoping it was due to something else) --> also got me some duplicated groups. I do have IDs in the config but to different tenants so I'm falling into a incorrect "fix" via https://github.com/microsoft/Microsoft365DSC/pull/4370/files#diff-21e85585dbcfad3a814015a305f2c306a15cf27bc860e2b6d321c1142329d500 (it also replaced the single quotes of the filter instead of just the $DisplayName variable content resulting in an error on the "get").

$filter = "DisplayName eq '$DisplayName'" -replace "'", "''"
$Group = Get-MgGroup -Filter $filter -ErrorAction Stop

the above should be changed to the same fix as @NikCharlebois did a couple lines down
if ($DisplayName.Contains("'"))
{
$DisplayName = $DisplayName -replace "'", "''"
}
$filter = "DisplayName eq '$DisplayName'"
$Group = Get-MgGroup -Filter $filter -ErrorAction Stop

from microsoft365dsc.

kevin14389 avatar kevin14389 commented on September 13, 2024

All the groups are like this : LGG-***-Microsoft 365 E3
Just replace the *** by a name with no character.
Also, we use always the same Id.

For exemple :

`

tututu

    AADGroup "AADGroup-LGG-TUTUTU-Microsoft 365 E3"
    {
        ApplicationId                 = $ConfigurationData.NonNodeData.ApplicationId;
        AssignedLicenses              = @(MSFT_AADGroupLicense 
                                        { 
                                        DisabledPlans = @('ADALLOM_S_DISCOVERY')
                                        SkuId         = 'SPE_E3'
                                        }
        );
        CertificateThumbprint         = $ConfigurationData.NonNodeData.CertificateThumbprint;
        Description                   = "Microsoft 365 E3 collaboration license for TUTUTU";
        DisplayName                   = "LGG-TUTUTU-Microsoft 365 E3";
        Ensure                        = "Present";
        GroupTypes                    = @("DynamicMembership");
        Id                            = "11a11a11a-11a1-1111-1ab1-1115e0511100";
        MailEnabled                   = $False;
        MailNickname                  = "***";
        MemberOf                      = @();
        MembershipRule                = "";
        MembershipRuleProcessingState = "On";
        Owners                        = @();
        SecurityEnabled               = $True;
        TenantId                      = $OrganizationName;
    }

## tatata
    AADGroup "AADGroup-LGG-TATATA-Microsoft 365 E3"
    {
        ApplicationId                 = $ConfigurationData.NonNodeData.ApplicationId;
        AssignedLicenses              = @(MSFT_AADGroupLicense 
                                        { 
                                        DisabledPlans = @('ADALLOM_S_DISCOVERY')
                                        SkuId         = 'SPE_E3'
                                        }
        );
        CertificateThumbprint         = $ConfigurationData.NonNodeData.CertificateThumbprint;
        Description                   = "Microsoft 365 E3 collaboration license for TATATA";
        DisplayName                   = "LGG-TATATA-Microsoft 365 E3";
        Ensure                        = "Present";
        GroupTypes                    = @("DynamicMembership");
        Id                            = "11a11a11a-11a1-1111-1ab1-1115e0511100";
        MailEnabled                   = $False;
        MailNickname                  = "***";
        MemberOf                      = @();
        MembershipRule                = "";
        MembershipRuleProcessingState = "On";
        Owners                        = @();
        SecurityEnabled               = $True;
        TenantId                      = $OrganizationName;
    }

`

I hope this will help you.

from microsoft365dsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.