Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

IntuneDeviceCompliancePolicyWindows10: Shows App ID and secret in plain text

Open Kikaider opened this issue 5 years ago • 2 comments

Details of the scenario you tried and the problem that is occurring

Export-M365DSCConfiguration -Quiet -componentsToExtract @($com) -FileName $fileName -Path $path -ConfigurationName $configurationName -ApplicationID $AppID -TenantId $Tenant -ApplicationSecret $AppSecret

where $com = "IntuneDeviceCompliancePolicyWindows10" resulted in a configuration file that showed the ApplicationId and ApplicationSecret in plain text.

My particular environment has empty configurations for the following components so I am unable to verify this issue for them:

  • IntuneDeviceCompliancePolicyAndroid
  • IntuneDeviceCompliancePolicyAndroidWorkProfile
  • IntuneDeviceCompliancePolicyMacOS

Verbose logs showing the problem

N/A

Suggested solution to the issue

Use $ConfigurationData.NonNodeData.ApplicationId and $ConfigurationData.NonNodeData.ApplicationSecret, which is used in the other Intune components.

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

OsName : Microsoft Windows 10 Pro OsOperatingSystemSKU : 48 OsArchitecture : 64-bit WindowsVersion : 2009 WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406 OsLanguage : en-US OsMuiLanguages : {en-US}

Version of the DSC module that was used ('dev' if using current dev branch)

1.21.728.1

Kikaider avatar Aug 04 '21 14:08 Kikaider

@RuudGijsbers another one to look at, let me know if you need my help with some of the Intune related items. Thanks

NikCharlebois avatar Aug 24 '21 12:08 NikCharlebois

@Kikaider I'm looking into it and will update you when I know more

RuudGijsbers avatar Sep 08 '21 19:09 RuudGijsbers