Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Tenant Config Compilation Error.

Open pradeepmnrecit opened this issue 1 year ago • 41 comments

Description of the issue

Dear Team ,

While i compile the configuration file , i am getting the attached error. Kindly advice. Thanks Pradeep M365DSC error

Microsoft 365 DSC Version

1.23.1122.1 1.23.1122.1

Which workloads are affected

Teams

The DSC configuration

No response

Verbose logs showing the problem

No response

Environment Information + PowerShell Version

No response

pradeepmnrecit avatar Jan 11 '24 16:01 pradeepmnrecit

You have two resources with the same name (TeamsChannel-test) in your config. Please remove or rename one of them. The resource identifier must be unique.

malauter avatar Jan 11 '24 16:01 malauter

Hi Malauter and Andi

Kindly help and guide with below error

==============================

PS C:\NEWDSC> .\M365TenantConfig.ps1

Test-ConflictingResources : A conflict was detected between resources '[TeamsTeam]TeamsTeam-WPO - ESWD (C:\NEWDSC\M365TenantConfig.ps1::44815::9::TeamsTeam)' and '[TeamsTeam]TeamsTeam-WPO - ESWD-2 (C:\NEWDSC\M365TenantConfig.ps1::56831::9::TeamsTeam)' in node 'localhost'. Resources have identical key properties but there are differences in the following non-key properties: 'MailNickName;GroupID;Owner'. Values 'ES-SESPM;2473271a-e13d-4110-a7a7-af66ebd053aa;[email protected]' don't match values 'WPI-ESWD;99fb6e7a-2e5f-49df-a95b-9e3522ae6473;[email protected]'. Please update these property values so that they are identical in both cases. At line:289 char:9

  •     Test-ConflictingResources $keywordName $canonicalizedValue $k ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Write-Error], InvalidOperationException
    • FullyQualifiedErrorId : ConflictingDuplicateResource,Test-ConflictingResources Test-ConflictingResources : A conflict was detected between resources '[TeamsTeam]TeamsTeam-OXG – Office of Micro Supervisors (C:\NEWDSC\M365TenantConfig.ps1::57883::9::TeamsTeam)' and '[TeamsTeam]TeamsTeam-OXG – Office of Micro Supervisors-2 (C:\NEWDSC\M365TenantConfig.ps1::60934::9::TeamsTeam)' in node 'localhost'. Resources have identical key properties but there are differences in the following non-key properties: 'MailNickName;GroupID'. Values 'OIGOfficeofManagementSupervisors;a42a567e-5426-4b95-9bd5-14a757c13f5a' don't match values 'OIGOfficeofManagementSupervisors445;c652c74c-2996-41f6-ab3a-831edecb4e85'. Please update these property values so that they are identical in both cases. At line:289 char:9
  •     Test-ConflictingResources $keywordName $canonicalizedValue $k ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Write-Error], InvalidOperationException
    • FullyQualifiedErrorId : ConflictingDuplicateResource,Test-ConflictingResources Compilation errors occurred while processing configuration 'M365TenantConfig'. Please review the errors reported in error stream and modify your configuration code appropriately. At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:3917 char:5
  • throw $ErrorRecord
    
  • ~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (M365TenantConfig:String) [], InvalidOperationException
    • FullyQualifiedErrorId : FailToProcessConfiguration What is [teams teams] in the above error, appreciate your response. I have copied the error code. Thanks Pradeep

pradeepmnrecit avatar Jan 18 '24 18:01 pradeepmnrecit

Could you please share the corresponding DSC configuration? The error message sounds like you have two resources with the same display name (this is the key property for a Teams team).

malauter avatar Jan 18 '24 18:01 malauter

Hi Malauter

Is it ok using the above to help me out. Thanks Pradeep

pradeepmnrecit avatar Jan 19 '24 17:01 pradeepmnrecit

M365TenantConfig.zip HI Malauter Please find the above newly attached error code and also the dsc configuration file, Kindly guide. Thanks Pradeep

pradeepmnrecit avatar Jan 21 '24 06:01 pradeepmnrecit

The attached config looks good, I cannot detect the conflicts from the error message. But the M365 DSC version used to generate the config is old, could you please try to update M365 DSC and all dependencies to the current version by running this:

Update-M365DSCModule

After that, please recreate the config and try again.

malauter avatar Jan 21 '24 20:01 malauter

Hi Malater,

I have updated the modules and its dependencies. Now I am getting an attached error, Kindly advice. certificate error

Thanks Pradeep

pradeepmnrecit avatar Jan 24 '24 04:01 pradeepmnrecit

The TeamsUser resource has no Certificate parameter, it is called CertificateThumbprint. Please have a look at the documentation: https://microsoft365dsc.com/resources/teams/TeamsUser/

malauter avatar Jan 24 '24 07:01 malauter

Dear Malauter

I didn't get your point, you mean my DSC configuration has a mistake, if you rephrase that it will be great. Thanks Pradeep

pradeepmnrecit avatar Jan 24 '24 09:01 pradeepmnrecit

image Hi Malauter

I have attached one of theams user details as well , we are not using Certificate Parameter in this ps1 file.

pradeepmnrecit avatar Jan 24 '24 09:01 pradeepmnrecit

The error message says "Certificate not found". Is the mentioned thumbprint correct and is the certificate in the cert store accessible for DSC? Maybe you can try with credentials instead of cert based authentication first (just for testing).

malauter avatar Jan 24 '24 10:01 malauter

Hi Malauter Actually, we have only SP-based authentication supported at the moment. How can i verify my DSC can be accessible via certificate?

IS the below command is helpful!. Please advise.

Connect-MicrosoftTeams -CertificateThumbprint "A937EEF7DA9xxxxxxxxxxx" -ApplicationId "6db23af4-c4ea-4811-xxx-710e97c1f303" -TenantId xxx.onmicrosoft.com

Appreciate your response.!

pradeepmnrecit avatar Jan 24 '24 10:01 pradeepmnrecit

Is your Connect-MicrosoftTeams command working? It is using another CertificateThumbprint than mentioned in the error message

malauter avatar Jan 24 '24 11:01 malauter

Hi Malauter

The above is just a masked thumprint and App ID , Using the above command i can able to connect.

Thanks Pradeep

pradeepmnrecit avatar Jan 24 '24 11:01 pradeepmnrecit

HI Malatur

After the Module upgrade when i list module the below out shows 3 modules of Microsoft365DCS , Kindly advice .Appreciate your response.

image

Thanks Pradeep

pradeepmnrecit avatar Jan 25 '24 06:01 pradeepmnrecit

Please run Uninstall-M365DSCOutDatedDependencies. This will try to uninstall outdated M365 versions and dependencies.

andikrueger avatar Jan 25 '24 12:01 andikrueger

Hi Andi

Does it solve certificate issue. image

Thanks Pradeep

pradeepmnrecit avatar Jan 25 '24 12:01 pradeepmnrecit

No, it won't. It's just answering your previous answer about the multiple M365DSC Module folders.

andikrueger avatar Jan 25 '24 12:01 andikrueger

Dear Andi

Thanks, Can you please address the above-mentioned certificate issue, because its so confusing ie, we can able to connect with teams with the below command. Connect-MicrosoftTeams -CertificateThumbprint "A937EEF7DA9xxxxxxxxxxx" -ApplicationId "6db23af4-c4ea-4811-xxx-710e97c1f303" -TenantId xxx.onmicrosoft.com

Appreciate your response.! Thanks Pradeep

pradeepmnrecit avatar Jan 25 '24 12:01 pradeepmnrecit

Dear Malatur and Andy

Please find the connect-microsoftteams output.

Connect-Microsoftteams

pradeepmnrecit avatar Jan 25 '24 15:01 pradeepmnrecit

Could you please share in which location the certificate is stored. For DSC to be able to access the certificate, it needs to be placed in the computer store.

andikrueger avatar Jan 25 '24 15:01 andikrueger

Thanks a lot, Andy. I will check the advised option and revert.

Thanks Pradeep

pradeepmnrecit avatar Jan 25 '24 16:01 pradeepmnrecit

Currently its in personal Store of Current user. image

pradeepmnrecit avatar Jan 25 '24 16:01 pradeepmnrecit

Hi Andy

Now i have placed in Computer store and see image

pradeepmnrecit avatar Jan 25 '24 17:01 pradeepmnrecit

Hi Andy

Kindly find the new Error ,Please advise on this.

image

pradeepmnrecit avatar Jan 25 '24 17:01 pradeepmnrecit

Hi Malatur and Andy

Can you please advise on the above error please. Thanks Pradeep

pradeepmnrecit avatar Jan 29 '24 09:01 pradeepmnrecit

Hi Malatur and Andy

Kindly help me on this above error, your advise will be always helpful. Thanks Pradeep

pradeepmnrecit avatar Jan 30 '24 10:01 pradeepmnrecit

Hi Team

Kindly advise, please.

pradeepmnrecit avatar Jan 30 '24 15:01 pradeepmnrecit

Dear Malatur

Appreciate it helpful to answer my query, please.

Thanks Pradeep

pradeepmnrecit avatar Jan 31 '24 09:01 pradeepmnrecit

Hi Team

Appreciate your response.

pradeepmnrecit avatar Jan 31 '24 15:01 pradeepmnrecit