Closed jadamones closed 1 month ago
Could you share the part of your configuration that would describe the full resource? Thanks!
This was also raised here: https://github.com/microsoft/DSCParser/issues/47
edit: sorry for the hijack. this was fixed via https://github.com/microsoft/Microsoft365DSC/issues/4779#issuecomment-2228947648 (since I was running it outside of the regular pipeline..)
I think it's because FeatureSettings
as an example parameter isn't set up as an array or the schema isn't properly setup? https://microsoft365dsc.com/resources/azure-ad/AADAuthenticationMethodPolicyAuthenticator/
https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyAuthenticator/MSFT_AADAuthenticationMethodPolicyAuthenticator.schema.mof
The parser doesn't know what to do with it as $associatedCIMProperty.CIMType ends up empty
https://github.com/microsoft/DSCParser/blob/master/Modules/DSCParser/Modules/DSCParser.psm1#L648
...not entirely sure
Example errors
Invoke-Expression : In Zeile:1 Zeichen:63
+ ... $typeStaticMethods = [] | gm - ...
+ ~
Der Typname nach "[" fehlt.
In Zeile:4 Zeichen:46
+ []::TryParse($subExpressi ...
+ ~
Der Typname nach "[" fehlt.
In C:\Program Files\WindowsPowerShell\Modules\DSCParser\2.0.0.7\Modules\DSCParser.psm1:337 Zeichen:25
+ ... Invoke-Expression -Command $scriptBlock | Out-N ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
+ FullyQualifiedErrorId : MissingTypename,Microsoft.PowerShell.Commands.InvokeExpressionCommand
Example config (from export):
AADAuthenticationMethodPolicyAuthenticator "AADAuthenticationMethodPolicyAuthenticator-MicrosoftAuthenticator"
{
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
Ensure = "Present";
FeatureSettings = MSFT_MicrosoftGraphmicrosoftAuthenticatorFeatureSettings{
DisplayLocationInformationRequiredState = MSFT_MicrosoftGraphAuthenticationMethodFeatureConfiguration{
ExcludeTarget = MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget{
Id = '00000000-0000-0000-0000-000000000000'
TargetType = 'group'
}
IncludeTarget = MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget{
Id = 'all_users'
TargetType = 'group'
}
State = 'default'
}
CompanionAppAllowedState = MSFT_MicrosoftGraphAuthenticationMethodFeatureConfiguration{
ExcludeTarget = MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget{
Id = '00000000-0000-0000-0000-000000000000'
TargetType = 'group'
}
IncludeTarget = MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget{
Id = 'all_users'
TargetType = 'group'
}
State = 'default'
}
DisplayAppInformationRequiredState = MSFT_MicrosoftGraphAuthenticationMethodFeatureConfiguration{
ExcludeTarget = MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget{
Id = '00000000-0000-0000-0000-000000000000'
TargetType = 'group'
}
IncludeTarget = MSFT_AADAuthenticationMethodPolicyAuthenticatorFeatureTarget{
Id = 'all_users'
TargetType = 'group'
}
State = 'default'
}
};
Id = "MicrosoftAuthenticator";
IncludeTargets = @(
MSFT_AADAuthenticationMethodPolicyAuthenticatorIncludeTarget{
Id = 'all_users'
TargetType = 'group'
}
);
IsSoftwareOathEnabled = $False;
State = "disabled";
TenantId = $OrganizationName;
}
Can you please perform a winrm quickconfig
? It's now a prerequisite since DSCParser v2
For more information, you can refer to https://github.com/microsoft/Microsoft365DSC/issues/5064
Does DSC Parser 2.0.0.3 handle resources with nested configurations like AADAuthenticationMethodPolicyAuthenticator? If so, how do I compare against those configurations? All I get when convert this to an object is below which doesn't contain all of the settings. Perhaps I missed some documentation somewhere about this?