Not extracting SCSensitivityLabels
Details of the scenario you tried and the problem that is occurring
I'm extracting a configuration from a M365 tenant which contains sensitivity labels, however after the extraction the sensitivity labels are not extracted into the ps1 file.
Verbose logs showing the problem
Suggested solution to the issue
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here
Export-M365DSCConfiguration -Quiet -GlobalAdminAccount $M365creds Export-M365DSCConfiguration -ComponentsToExtract @('O365AdminAuditLogConfig','O365OrgCustomizationSetting','EXOAntiPhishPolicy','EXOAntiPhishRule','EXOAtpPolicyForO365','EXODkimSigningConfig','EXOHostedConnectionFilterPolicy','EXOHostedCon tentFilterPolicy','EXOHostedContentFilterRule','EXOHostedOutboundSpamFilterPolicy','EXOMalwareFilterPolicy','EXOMalwareFilterRule','EXOSafeAttachmentPolicy','EXOSafeAttachmentRule','EXOSafeLinksPolicy','EXOSafeLinksRule','EXOSharingPolicy','ODSet tings','SPOAccessControlSettings','SPOSharingSettings','SPOTenantCdnEnabled','SPOTenantCdnPolicy','SPOTenantSettings','SCAuditConfigurationPolicy','SCLabelPolicy','SCSensitivityLabel','TeamsCallingPolicy','TeamsChannelsPolicy','TeamsClientConfigu ration','TeamsEmergencyCallingPolicy','TeamsEmergencyCallRoutingPolicy','TeamsGuestCallingConfiguration','TeamsGuestMeetingConfiguration','TeamsGuestMessagingConfiguration','TeamsMeetingBroadcastConfiguration','TeamsMeetingBroadcastPolicy','Teams MeetingConfiguration','TeamsMeetingPolicy','TeamsMessagingPolicy','TeamsPstnUsage','TeamsTenantDialPlan','TeamsUpgradeConfiguration','TeamsUpgradePolicy','TeamsVoiceRoute','TeamsVoiceRoutingPolicy','AADConditionalAccessPolicy','AADGroupsNamingPol icy','AADGroupsSettings','AADMSGroupLifecyclePolicy','AADPolicy','AADRoleDefinition','AADTenantDetails') -path $path -filename "$Tenantid-runbook_$date.ps1" -Verbose
The operating system the target node is running
OsName : Microsoft Windows 10 Pro OsOperatingSystemSKU : 48 OsArchitecture : 64-bit WindowsVersion : 2004 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.120.1

@hmank Is there an error file in directory where you ran extract?
No not at all, the remainder of the configuration exports I did notice that the labels were not in my export.
we have the same issue and also no error or warning. Tried 2 different Tenants
I was able to repro, I'll look into issue this week
I was able to repro, I'll look into issue this week
Thanks, we tried to find the issue and what we found so far is:
when we remove the skipmodulereload param => it works.
if ($Global:CurrentModeIsExport)
{
$ConnectionMode = New-M365DSCConnection -Platform 'SecurityComplianceCenter'
-InboundParameters $PSBoundParameters
-SkipModuleReload $true
}
I have a fix for this will be released next week. There was a regression bug but if you install Install-Module -Name Microsoft365DSC -RequiredVersion 1.21.127.1 extract of labels should work
Hi @desmay , I just upgraded my dsc module to 1.21.127.1 and re-ran the extract the Labels are not included in the extract.
@desmay what is the status on this one? Thanks
@hmank @jorisbaiutti Have you tried an export with the latest version. I've just tried extracting labels from 2 different tenants with no issues.