Updating userid_attribute in Connection Not Allowed

Overview

Trying to update a connection including the parameter userid_attribute with the value oid results in the following error:

Bad Request

“userid_attribute” = “oid” can only be used when “waad_protocol” = “openid-connect” error message.

Creating a connection is successful even without including the waad_protocol as it defaults to openid-connect, but updating a connection requires the waad protocol’s value to be specified if the userid attribute is set in options.

Applies To

  • Update Connections
  • Management API

Cause

Trying to update a connection and seting the userid attribute to oid without also ensuring that the waad protocol is openid-connect.

Solution

Add the waad_protocol field with the value openid-connect in the request body or remove the userid_attribute field.

Example payload:

Add the waad_protocol field with the value openid-connect in the request body or remove the userid_attribute field.

Example payload:

{

  display_name: "foo-bar",

  options: {

    type: "back_channel",

    client_id: "**",

    client_secret: "**",

    domain: "**",

    tenant_domain: "**",

    domain_aliases: ["**"],

    email_verification: false,

    userid_attribute: "oid",

    waad_protocol: "openid-connect",

    useCommonEndpoint: false,

    identity_api: "microsoft-identity-platform-v2.0"

  }

}