-
Notifications
You must be signed in to change notification settings - Fork 437
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
Error while running export using application id and secret #2423
Comments
Error while running an export using service principal with application secret |
What version of m365dsc are you using and what are your environment details? Please provide as much information as possible. Please review the event log of m365dsc and windows if there are any related events. |
I am running 1.22.1019.1 version. I have checked event log and was not able to find anything. Running on Windows version- Windows 10 19044.2006 The export works fine with username/credentials but it fails with the application id/secret |
What workloads do you want to export? |
Also, can you post the entire command you are trying to execute when getting this error? Thanks |
I am running an export for AADGroup and AADConditionalAccessPolicy. It works fine with app id and certificate but it doesnt with app secrect Export-M365DSCConfiguration -Components @("AADGroup") -ApplicationId '' -ApplicationSecret '' -TenantId '' |
Module version: 1.22.1019.1 I have the same issue. This is my first time using it. I also ran Update-M365DSCDependencies -Force, however oddly enough I'm still get a message indicating newer versions of components are available. the command is: Below is the full message: Authentication methods specified:
New version of {Microsoft.Graph.Applications} is available {1.13.0} |
changed ApplicationSecret variable from string to PSCredential in functions Start-M365DSCConfigurationExtract, Export-M365DSCConfiguration, and Get-M365DSCTenantDomain. Removed line converting the string to a pscredential as it is no longer required, added a line to convert back to string for final output
I'm getting the same errors, I think it is because a couple of functions in the M365DSCReverse.psm1 and M365DSCUtil.psm1 are still expecting $applicationSecret to be a string (using latest module code and updated dependencies). I've got it to work on my exports ( just exporting IntuneAppProtectionPolicyAndroid config) - I'll submit a pull request for review |
@menswearUK & @sanyoggulaty can you please confirm if this is still an issue with the latest version? Thanks |
@NikCharlebois - latest version seems to be working fine for me - passing the secret to Export-M365DSCConfiguration as a string as per previous versions. Thanks |
While running an export for any component- I get this error
Method invocation failed because [System.String] does not contain a method named 'GetNetworkCredential'.
The text was updated successfully, but these errors were encountered: