Skip to content

Enhancement external connection doctor: Allow return values of evolvable enum when reading schema #5826

Description

@MartinM85

The command external connection doctor reads schema to check whether the labels title, icon and iconUrl are defined.

Tricky part is iconUrl, because according to the doc you must use the Prefer: include-unknown-enum-members request header to retrieve iconUrl.

Example:

GET https://graph.microsoft.com/v1.0/external/connections/contosohr/schema

without Prefer: include-unknown-enum-members will return unknownFutureValue instead of iconUrl

{
    "baseType": "microsoft.graph.externalItem",
    "properties": [
        ...
        {
            "name": "iconUrlProperty",
            "type": "string",
            "isSearchable": true,
            "isRetrievable": true,
            "isQueryable": false,
            "labels": [
                "unknownFutureValue"
            ],
            "isRefinable": false,
            "aliases": []
        }
    ]
}
GET https://graph.microsoft.com/v1.0/external/connections/contosohr/schema

with Prefer: include-unknown-enum-members will return correct label iconUrl

{
    "baseType": "microsoft.graph.externalItem",
    "properties": [
        ...
        {
            "name": "iconUrlProperty",
            "type": "string",
            "isSearchable": true,
            "isRetrievable": true,
            "isQueryable": false,
            "labels": [
                "iconUrl"
            ],
            "isRefinable": false,
            "aliases": []
        }
    ]
}

The enhancement should be easy by adding the Prefer: include-unknown-enum-members header to the request when reading schema

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions