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

O365Group not authenticating with graph: Fix in M365DSCUtil.psm1 line 4111 #5095

Closed
ericoevering opened this issue Sep 25, 2024 · 1 comment · Fixed by #5098 or #5132
Closed

O365Group not authenticating with graph: Fix in M365DSCUtil.psm1 line 4111 #5095

ericoevering opened this issue Sep 25, 2024 · 1 comment · Fixed by #5098 or #5132

Comments

@ericoevering
Copy link

Description of the issue

when authenticating to O365Group resource it will try to use exchange because $resource is a hashtable it should be $resource.Name

new code: from line 4111
if (-not $workloads.Name -or -not $workloads.Name.Contains('MicrosoftGraph') -and $resource.Name -eq 'O365Group')

Old line :
if (-not $workloads.Name -or -not $workloads.Name.Contains('MicrosoftGraph') -and $resource -eq 'O365Group')

Microsoft 365 DSC Version

1.24.904.1

Which workloads are affected

Office 365 Admin

The DSC configuration

No response

Verbose logs showing the problem

No response

Environment Information + PowerShell Version

No response

@ericoevering
Copy link
Author

ericoevering commented Sep 25, 2024

        'O3'
        {
            if (-not $workloads.Name -or -not $workloads.Name.Contains('MicrosoftGraph') -and $resource.Name -eq 'O365Group')
            {
                $workloads += @{
                    Name                 = 'MicrosoftGraph'
                    AuthenticationMethod = $resource.AuthenticationMethod
                }
            }
            elseif (-not $workloads.Name -or -not $workloads.Name.Contains('ExchangeOnline'))
            {
                $workloads += @{
                    Name                 = 'ExchangeOnline'
                    AuthenticationMethod = $resource.AuthenticationMethod
                }
            }
        }

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