You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring
With the switch of the ApplicationSecret from String to PSCredential, the code in the Export function has not been updated. It still accepts the ApplicationSecret as a string and does not convert it later on. But then it calls New-M365DSCTenantDomain here:
Details of the scenario you tried and the problem that is occurring
With the switch of the ApplicationSecret from String to PSCredential, the code in the Export function has not been updated. It still accepts the ApplicationSecret as a string and does not convert it later on. But then it calls New-M365DSCTenantDomain here:
Microsoft365DSC/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1
Lines 237 to 241 in 7d3f641
That in turn is calling the New-M365DSCConnection function and passing in all parameters, including the ApplicationSecret as string:
Microsoft365DSC/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1
Lines 1398 to 1399 in 7d3f641
The New-M365DSCConnection function is then trying to get the secrets from the PSCredential object (which it is not):
Microsoft365DSC/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1
Line 1522 in 7d3f641
This results in a "Method invocation failed because [System.String] does not contain a method named 'GetNetworkCredential'." error
Verbose logs showing the problem
Suggested solution to the issue
Update the export functions to also require the ApplicationSecret as a PSCredential
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here
The operating system the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
dev
The text was updated successfully, but these errors were encountered: