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

Can't deploy AADAdministrativeUnit - unexpected instance annotation name 'https://graph.microsoft.com/beta/administrativeUnits' #4404

Closed
fletchertom opened this issue Mar 4, 2024 · 0 comments · Fixed by #4480 or #4512
Labels
Bug Something isn't working Entra ID V1.24.221.1 Version 1.24.221.1

Comments

@fletchertom
Copy link

Description of the issue

When trying to deploy an AADAdministrativeUnit we get the following:

An unexpected instance annotation name 'https://graph.microsoft.com/beta/administrativeUnits' was found when reading from the JSON reader, In OData, Instance annotation name must start with @.

Microsoft 365 DSC Version

1.24.221.1

Which workloads are affected

Azure Active Directory

The DSC configuration

param (
    [Parameter(Mandatory = $true)]
    [string]$ApplicationID,
    [Parameter(Mandatory = $true)]
    [string]$CertificateThumbprint,
    [Parameter(Mandatory = $true)]
    [string]$TenantName,
    [Parameter(Mandatory = $true)]
    [string]$OutputDirectory
)

Configuration AADAdministrativeUnit
{
    param (
    )

    Import-DscResource -ModuleName 'Microsoft365DSC'

    Node localhost
    {
        AADAdministrativeUnit "AADAdministrativeUnit-xyz"
        {
            ApplicationId         = $ApplicationId;
            CertificateThumbprint = $CertificateThumbprint;
            TenantId              = $TenantName;
            Description           = "description";
            DisplayName           = "xyz";
            Ensure                = "Present";
            Members               = @(
                MSFT_MicrosoftGraphMember{
                    Type = 'Group'
                    Identity = 'xyz'
                }
                MSFT_MicrosoftGraphMember{
                    Type = 'Group'
                    Identity = 'xyz'
                }
                MSFT_MicrosoftGraphMember{
                    Type = 'Group'
                    Identity = 'xyz'
                }
            );
        }
    }
}

Verbose logs showing the problem

VERBOSE: []: [[AADAdministrativeUnit]AADAdministrativeUnit-xxxx] Creating an Azure AD Administrative Unit with DisplayName {xxxx}
VERBOSE: []: [[AADAdministrativeUnit]AADAdministrativeUnit-xxxx] Creating new Administrative Unit with: description=xyz.

displayName=xyz
VERBOSE: []: [[AADAdministrativeUnit]AADAdministrativeUnit-xxxx] POST  https://graph.microsoft.com/beta/administrativeUnits with 119-byte payload
VERBOSE: []: [[AADAdministrativeUnit]AADAdministrativeUnit-xxxx] received 393-byte response of content type application/json
VERBOSE: []: [[AADAdministrativeUnit]AADAdministrativeUnit-xxxx] Adding new dynamic member {id}
##[error][Request_BadRequest] : An unexpected instance annotation name 'https://graph.microsoft.com/beta/administrativeUnits' was found when reading from the JSON reader, In OData, Instance annotation name must start with @.
##[error]PowerShell exited with code '1'.

Environment Information + PowerShell Version

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Entra ID V1.24.221.1 Version 1.24.221.1
Projects
None yet
2 participants