MSFT_SCSensitivityLabel: Wants to show modal dialog box
Details of the scenario you tried and the problem that is occurring
I tried to set a Sensitivity Label and it seems the DSC wants to show a modal dialog box and throws an error.
Verbose logs showing the problem
VERBOSE: [DESKTOP-HIKNA0L]: LCM: [ Start Resource ] [[SCSensitivityLabel]1fbeff0e-05a9-41b5-92b0-8302ce14cf5b]
VERBOSE: [DESKTOP-HIKNA0L]: LCM: [ Start Test ] [[SCSensitivityLabel]1fbeff0e-05a9-41b5-92b0-8302ce14cf5b]
VERBOSE: [DESKTOP-HIKNA0L]: [[SCSensitivityLabel]1fbeff0e-05a9-41b5-92b0-8302ce14cf5b]
Testing configuration of Sensitivity label for Sensitive
VERBOSE: [DESKTOP-HIKNA0L]: [[SCSensitivityLabel]1fbeff0e-05a9-41b5-92b0-8302ce14cf5b]
Getting configuration of Sensitivity Label for Sensitive
VERBOSE: [DESKTOP-HIKNA0L]: [[SCSensitivityLabel]1fbeff0e-05a9-41b5-92b0-8302ce14cf5b]
Calling Test-SecurityAndComplianceConnection function:
VERBOSE: [DESKTOP-HIKNA0L]: LCM: [ End Test ] [[SCSensitivityLabel]1fbeff0e-05a9-41b5-92b0-8302ce14cf5b] in
11.1500 seconds.
PowerShell DSC resource MSFT_SCSensitivityLabel failed to execute Test-TargetResource functionality with error
message: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid
operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service
application..
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : localhost
VERBOSE: [DESKTOP-HIKNA0L]: LCM: [ End Set ]
The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : localhost
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 26.286 seconds`
Suggested solution to the issue
Not sure
The DSC configuration that is used to reproduce the issue (as detailed as possible)
SCSensitivityLabel 1fbeff0e-05a9-41b5-92b0-8302ce14cf5b
{
AdvancedSettings = @(
MSFT_SCLabelSetting
{
Key = 'tooltip'
Value = 'Unclassifed data'
}
);
Comment = "";
# Disabled = $False;
DisplayName = "Sensitive";
Ensure = "Present";
GlobalAdminAccount = $Credsglobaladmin;
LocaleSettings = @(
MSFT_SCLabelLocaleSettings
{
LocaleKey = 'displayName'
Settings = @(
MSFT_SCLabelSetting
{
Key = 'default'
Value = 'Sensitive'
}
)
}
MSFT_SCLabelLocaleSettings
{
LocaleKey = 'tooltip'
Settings = @(
MSFT_SCLabelSetting
{
Key = 'default'
Value = 'Sensitive'
}
)
}
);
Name = "Sensitive";
Priority = 0;
Tooltip = "Sensitive";
}
insert configuration here
The operating system the target node is running
OsName : Microsoft Windows 10 Enterprise OsOperatingSystemSKU : EnterpriseEdition OsArchitecture : 64-bit WindowsVersion : 1909 WindowsBuildLabEx : 18362.1.amd64fre.19h1_release.190318-1202 OsLanguage : en-US OsMuiLanguages : {en-US}
Version of the DSC module that was used ('dev' if using current dev branch)
1.20.603.1
Hello. I tried your configuration file on a demo tenant with no issue. Have you tried other resources besides MSFT_SCSensitivityLabel from this workstation and targeting this tenant ?
Have you tried Connect-PnPOnline -Url $spoSiteURL -UseWebLogin or Connect-PnPOnline -Url $spoSiteURL to test connectivity? It may give you a better error message.
Also, did this work before and stopped working? Have you successfully run M365DSC before and now it stopped working? Is this the 1st time using the Security & Compliance configuration?
When I get the same error from Assert-M365DSCTemplate, running Connect-PnPOnline -Url $spoSiteURL errors with "The remote server returned an error: (401) Unauthorized.", even though I am a GA, SA, and TSA. My template only has 2 SPO configs in it.
Thanks for the replies - this is the first time using the Security & Compliance configuration. I think I've fixed it, there was a conditional access policy which requires Terms & Conditions to be accepted before proceeding.
Did you manually acknowledge the terms dialog? It may reappear after a configurable amount of time.
I am still having problems after clearing the terms dialog manually. My office apps are behind Microsoft Cloud App Security and I think the warning page that comes up informing users that access is monitored is the issue. I will try to exempt my account or something to verify.
Just want to make sure, are you folks using the credentials of an account with MFA enabled or not? Thanks
@NikCharlebois in my case the account doesn't have MFA, but it does have an Azure AD Conditional Access policy which enforced Terms of Use to be accepted. I removed the T&C from been displayed for this account and now the issue is resolved for me.
In my case, mfa is enabled, but it wasn't the issue. The terms dialog is, and maybe the Cloud App Security splash page. I will be trying a service principal to get around those.
Get Outlook for Androidhttps://aka.ms/ghei36
From: bubbletroubles [email protected] Sent: Friday, July 3, 2020 8:00:40 AM To: microsoft/Microsoft365DSC [email protected] Cc: Rob Boté [email protected]; Comment [email protected] Subject: Re: [microsoft/Microsoft365DSC] MSFT_SCSensitivityLabel: Wants to show modal dialog box (#656)
@NikCharleboishttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNikCharlebois&data=02%7C01%7C%7C2a598b6b0cad4f1e4a8c08d81f48b6a9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637293744445435503&sdata=H%2Bp84poVDJF1XJq6vK92Z3OfEz3sa%2BC4U%2FUJ%2FxUO6Yg%3D&reserved=0 in my case the account doesn't have MFA, but it does have an Azure AD Conditional Access policy which enforced Terms of Use to be accepted. I removed the T&C from been displayed for this account and now the issue is resolved for me.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FMicrosoft365DSC%2Fissues%2F656%23issuecomment-653514264&data=02%7C01%7C%7C2a598b6b0cad4f1e4a8c08d81f48b6a9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637293744445435503&sdata=gGYsS36MN2ZDqm9Lg3txO1MiKvNtQmbzHEuW23FJU3Y%3D&reserved=0, or unsubscribehttps://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAES5HJZ7IS2LX5P4ROBCQRLRZXB6RANCNFSM4OJ736LQ&data=02%7C01%7C%7C2a598b6b0cad4f1e4a8c08d81f48b6a9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637293744445435503&sdata=sTbHdMaI%2Bhd0i5sZ0O6yDAq8frmV4U1cfy4uzmVEuz8%3D&reserved=0.
@bubbletroubles @Kikaider is this still an ongoing issue with the latest versions? Have we nailed it down to Conditional access? Thanks