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

TeamsTeam: Unable to create resources #4383

Closed
lantern-sam opened this issue Feb 28, 2024 · 0 comments · Fixed by #4384 or #4387
Closed

TeamsTeam: Unable to create resources #4383

lantern-sam opened this issue Feb 28, 2024 · 0 comments · Fixed by #4384 or #4387
Labels
Bug Something isn't working Teams V1.24.221.1 Version 1.24.221.1

Comments

@lantern-sam
Copy link
Contributor

Description of the issue

If you try and create a brand new TeamsTeam using M365DSC, it will not work.

There seems to be no error output for me either (tested on two machines) so it says it succeeds but with no error information. I will create a separate issue for this as it feels different enough.

It seems to be an issue with the MS Graph PowerShell commands, their parameters don't seem to be set correctly? I'm fairly sure that these commands would have never worked... I'm a little confused how there's no issue currently open for it..

I've made some changed on a branch which are now working for me so I'll submit a PR for this.

Microsoft 365 DSC Version

1.24.221.1

Which workloads are affected

Teams

The DSC configuration

Configuration Teams
{
    param (
    )

    $OrganizationName = $ConfigurationData.NonNodeData.OrganizationName

    Import-DscResource -ModuleName 'Microsoft365DSC' 

    Node localhost
    {
        
        TeamsTeam 'TechOps' {
            DisplayName           = "TestTeam1"
            Description           = "Team for Testing"
            Visibility            = "Private"
            MailNickName          = "TestTeam1"
            Owner                 = @("[email protected]")

            Ensure                = "Present"

            TenantId              = $OrganizationName;
            ApplicationId         = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
        }

    }
}

Teams -ConfigurationData .\ConfigurationData.psd1

Verbose logs showing the problem

VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =                                SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =                                root/Microsoft/Windows/DesiredStateConfiguration'.                                                                      VERBOSE: An LCM method call arrived from computer LAPTOP-JIM8LRGT with user sid                                         S-1-12-1-3228587383-1342040634-78774695-3344876676.                                                                     VERBOSE: [LAPTOP-JIM8LRGT]: LCM:  [ Start  Set      ]                                                                   VERBOSE: [LAPTOP-JIM8LRGT]: LCM:  [ Start  Resource ]  [[TeamsTeam]TestTeam1]                                             VERBOSE: [LAPTOP-JIM8LRGT]: LCM:  [ Start  Test     ]  [[TeamsTeam]TestTeam1]                                             VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Testing configuration of Team TestTeam1       VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Getting configuration of Team TestTeam1       VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Checking for existence of Team TestTeam1      VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] GroupID was NOT specified                   VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Done performing authorization               VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Executing Get-Team for parameters GroupId:  , User: , Archived: , Visibility: , DisplayName: TestTeam1, MailNickName:                                                 VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Retrieving groups list                      VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Done retrieving groups, getting team        properties                                                                                                              VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Done processing Get-Team                    VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Teams with displayname TestTeam1 doesn't      exist                                                                                                                   VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Current Values: ApplicationId=***           CertificateThumbprint=***                                                                                               Description=Team for Testing                                                                                     DisplayName=TestTeam1                                                                                                     Ensure=Absent                                                                                                           MailNickName=TestTeam1                                                                                                    Owner=([email protected])                                                                                             TenantId=***                                                                                                            Verbose=True                                                                                                            Visibility=Private                                                                                                      VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Target Values: ApplicationId=***            CertificateThumbprint=***
Description=Team for Testing
DisplayName=TestTeam1
Ensure=Present
MailNickName=TestTeam1
Owner=(sam@lantern.ai)
TenantId=***
Verbose=True
Visibility=Private
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Test-TargetResource returned False
VERBOSE: [LAPTOP-JIM8LRGT]: LCM:  [ End    Test     ]  [[TeamsTeam]TestTeam1]  in 0.5010 seconds.
VERBOSE: [LAPTOP-JIM8LRGT]: LCM:  [ Start  Set      ]  [[TeamsTeam]TestTeam1]
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Setting configuration of Team TestTeam1
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Getting configuration of Team TestTeam1
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Checking for existence of Team TestTeam1
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] GroupID was NOT specified
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Done performing authorization
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Executing Get-Team for parameters GroupId:
, User: , Archived: , Visibility: , DisplayName: TestTeam1, MailNickName:
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Retrieving groups list
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Done retrieving groups, getting team
properties
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Done processing Get-Team
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Teams with displayname TestTeam1 doesn't
exist
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Creating team TestTeam1
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Connection mode:
ServicePrincipalWithThumbprint
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Retrieving Group Owner {}
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Adding Owner {} to Group {}
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Adding Owner - Sleeping for 15 seconds
VERBOSE: [LAPTOP-JIM8LRGT]:                            [[TeamsTeam]TestTeam1] Creating Team - Sleeping for 15 seconds
VERBOSE: [LAPTOP-JIM8LRGT]: LCM:  [ End    Set      ]  [[TeamsTeam]TestTeam1]  in 30.7390 seconds.
VERBOSE: [LAPTOP-JIM8LRGT]: LCM:  [ End    Resource ]  [[TeamsTeam]TestTeam1]
VERBOSE: [LAPTOP-JIM8LRGT]: LCM:  [ End    Set      ]
VERBOSE: [LAPTOP-JIM8LRGT]: LCM:  [ End    Set      ]    in  31.3260 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 31.391 seconds

Environment Information + PowerShell Version

OsName               : Microsoft Windows 10 Business
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage           : en-GB
OsMuiLanguages       : {en-GB, en-US, ja-JP}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Teams V1.24.221.1 Version 1.24.221.1
Projects
None yet
2 participants