Org365Settings: CortanaEnabled detection logic issue
Description of the issue
I'm try to get a correct status for CortanaEnabled.
The logic in the O365OrgSettings is correct is CortanaEnabled is false:
- Presence of AppID and property AccountEnabled "false"
However if the AppID 0a0a29f9-0a25-49c7-94bf-c53c3f8fa69d (Cortana Experience with O365) is not listed, the UI reports that Cortana is available whereas M365DSC reports no line.
Microsoft 365 DSC Version
1.26.128.1
Which workloads are affected
Office 365 Admin
The DSC configuration
# Generated with Microsoft365DSC version 1.26.128.1
# For additional information on how to use Microsoft365DSC, please visit https://aka.ms/M365DSC
param (
)
Configuration M365TenantConfig
{
param (
)
$OrganizationName = $ConfigurationData.NonNodeData.OrganizationName
Import-DscResource -ModuleName 'Microsoft365DSC' -ModuleVersion '1.26.128.1'
Node localhost
{
O365OrgSettings "O365OrgSettings"
{
AdminCenterReportDisplayConcealedNames = $True;
AllowPlannerCopilot = $False;
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
AppsAndServicesIsAppAndServicesTrialEnabled = $False;
AppsAndServicesIsOfficeStoreEnabled = $False;
CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
DynamicsCustomerVoiceIsInOrgFormsPhishingScanEnabled = $True;
DynamicsCustomerVoiceIsRecordIdentityByDefaultEnabled = $True;
DynamicsCustomerVoiceIsRestrictedSurveyAccessEnabled = $False;
FormsIsBingImageSearchEnabled = $True;
FormsIsExternalSendFormEnabled = $True;
FormsIsExternalShareCollaborationEnabled = $False;
FormsIsExternalShareResultEnabled = $False;
FormsIsExternalShareTemplateEnabled = $False;
FormsIsInOrgFormsPhishingScanEnabled = $True;
FormsIsRecordIdentityByDefaultEnabled = $True;
InstallationOptionsAppsForMac = @();
InstallationOptionsAppsForWindows = @();
InstallationOptionsUpdateChannel = "current";
IsSingleInstance = "Yes";
M365WebEnableUsersToOpenFilesFrom3PStorage = $False;
PlannerAllowCalendarSharing = $True;
TenantId = $OrganizationName;
VivaInsightsDigestEmail = $False;
VivaInsightsOutlookAddInAndInlineSuggestions = $False;
VivaInsightsScheduleSendSuggestions = $False;
VivaInsightsWebExperience = $False;
}
}
}
M365TenantConfig -ConfigurationData .\ConfigurationData.psd1
Verbose logs showing the problem
Get-MgServicePrincipal | ? { $_.DisplayName -like '*Cortana*' } | Select AppID, DisplayName, AccountEnabled
AppId DisplayName AccountEnabled
----- ----------- --------------
81473081-50b9-469a-b9d8-303109583ecb Cortana Runtime Service True
2a486b53-dbd2-49c0-a2bc-278bdfc30833 Cortana at Work Service True
Environment Information + PowerShell Version
The logic in O365OrgSettings assumes that if the service principal does not exist, then Cortana is not enabled and it omits the value. Personally, I'd expect it to return CortanaEnabled = $false if it is missing. Do you have a screenshot of where it shows that Cortana is available? Maybe that's another setting somewhere else, not quite sure. The M365 Admin Center hides many properties behind APIs we currently don't support, and we're trying our best to achieve a good coverage.
The "0a0a29f9-0a25-49c7-94bf-c53c3f8fa69d (Cortana Experience with O365)" Service Principal only appeared in my test tenant when I unchecked the setting under that blade:
Closing this issue. We cannot act in the Microsoft 365 admin center, so we have to rely on the service principal being there.