-
Notifications
You must be signed in to change notification settings - Fork 523
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
Start-M365DSCConfigurationExtract broken for Service Principal with thumbprint #2374
Comments
Sorry, but it's still not fixed properly. Especially when exporting single components like 'O365SearchAndIntelligenceConfigurations' the authentication fails. The reason for this is that the authentication is checked in the Start-M365DSCConfigurationExtract function:
Then the method
is called. In this case, the check is performed in this way:
However, this does not work, as only CertificateThumbprint is transferred from the previous method. |
Details of the scenario you tried and the problem that is occurring
In the latest version of the module (1.22.1005.1) when running the Export-M365DSCConfiguration function with an Application ID and Certificate Thumbprint it fails.
I've chased the issue to a section of code in the "Start-M365DSCConfigurationExtract" function.
On line 231 (Get Tenant Info) the function calls the "Get-M365DSCTenantDomain" function without specifying the $CertificateThumbprint or $ApplicationSecret variables.
This function (Get-M365DSCTenantDomain) then attempts to create a connection to MSGraph, using the New-M365DSCConnection function and $PSBoundParameters parameters, but since the $CertificateThumbprint or $ApplicationSecret variables weren't defined the connection fails with "Could not determine authentication method"
Verbose logs showing the problem
Suggested solution to the issue
Add the $CertificateThumbprint and $ApplicationSecret variables to the "Get-M365DSCTenantDomain" command on line 237
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Version of the DSC module that was used ('dev' if using current dev branch)
1.22.1005.1
The text was updated successfully, but these errors were encountered: