azure-active-directorymicrosoft-graph-apimicrosoft-entra-identra

Entra ID Schema Extension with custom Namespace


I'm currently playing with schema extension and custom namespaces around and I get some strange error messages - maybe some of you know how to deal with it:

According to M$ documentation: domains with following tld's are supported to create schema extensions: .org. net. com

I've created the following Graph Query:

$Query = @{
        Method = "POST"
        Headers = @{
            Authorization = ("Bearer " + $JWT)
        }
        URI = "https://graph.microsoft.com/v1.0/schemaExtensions"
        ContentType = "application/json"
        Body = @{
            id = 'd***demo.com_CustomAttributes'
            description = 'Custom Attribute für das Entra ID'
            targetTypes = @(
                'Group'
            )
            properties = @(
                @{
                    name = 'SomeFancyAttribute1'
                    type = 'Boolean'
                }
            )
        } | ConvertTo-Json
    }
Invoke-RestMethod @Query

While posting this Schema Extension, Graph replied with: "Your organization must own the namespace d***demo.com as a part of one of the verified domains." enter image description here

But the Domain is added and verified....

$Query = @{
        Method = "GET"
        Headers = @{
            Authorization = ("Bearer " + $JWT)
        }
        URI = "https://graph.microsoft.com/v1.0/domains/d***demo.com"
        ContentType = "application/json"
    }
    Invoke-RestMethod @Query

enter image description here

Did anyone of you had a similar experience and could tell me how to solve this or is Microsoft just doing Microsoft things?


Solution

  • I'm not 100% sure of this, please verify if this works for you.

    The documentation says this:

    If you already have a vanity .com,.net, .gov, .edu or a .org domain that's verified with your tenant, you can use the domain name along with the schema name to define a unique name, in this format {domainName}_{schemaName}. For example, if your vanity domain is contoso.com, you can define an id of contoso_mySchema. This option is highly recommended.

    So your id should be:

    id = 'd***demo_CustomAttributes'