Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AADOrganizationCertificateBasedAuthConfiguration: Can't test or deploy #5523

Open
ricmestre opened this issue Dec 6, 2024 · 1 comment
Open

Comments

@ricmestre
Copy link
Contributor

Description of the issue

This resource cannot be tested or deployed because OrganizationId is not declared in its module as mandatory, I'll raise a PR to fix this.

Another example of an issue that should be caught if resources were actually being properly tested.

Microsoft 365 DSC Version

1.24.1204.1

Which workloads are affected

Azure Active Directory (Entra ID)

The DSC configuration

AADOrganizationCertificateBasedAuthConfiguration "AADOrganizationCertificateBasedAuthConfiguration-84ccd26f-0f32-4875-98c4-0464e86a2fd2"
        {
            Credential             = $CredsCredential;
            CertificateAuthorities = @(
                MSFT_MicrosoftGraphcertificateAuthority{
                    Certificate = '...'
                    DeltaCertificateRevocationListUrl = 'https://www.contoso.com/DeltaCertificateRevocationListUrl'
                    IsRootAuthority = $True
                }
            );
            Ensure                 = "Present";
            OrganizationId         = "84ccd26f-0f32-4875-98c4-0464e86a2fd2";
        }

Verbose logs showing the problem

The command Get-TargetResource of the PS resource MSFT_AADOrganizationCertificateBasedAuthConfiguration does not implement the key property OrganizationId mentioned in the corresponding MOF schema file C:\Program                          Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1204.1\DscResources\MSFT_AADOrganizationCertificateBasedAuthConfiguration\MSFT_AADOrganizationCertificateBasedAuthConfiguration.schema.mof as a mandatory parameter. All key parameters  mentioned in the schema file must be implemented by the command Get-TargetResource as mandatory function parameters.

Environment Information + PowerShell Version

Win11/PS5.1
@ricmestre
Copy link
Contributor Author

Actually there's more problems with this resource that clearly wasn't tested, I need to test other AAD resource so for now I won't raise the PR yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant