Child pages
  • WHM API 1 Functions - get_users_authn_linked_accounts
Skip to end of metadata
Go to start of metadata

Description

This function lists all accounts that link to available external authentication identity providers.

Examples 


 JSON API
/json-api/get_users_authn_linked_accounts?api.version=1
 XML API
/xml-api/get_users_authn_linked_accounts?api.version=1
 Command Line
whmapi1 get_users_authn_linked_accounts


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "data": {
    "username_linked_accounts": [
      {
        "preferred_username": "username@example.com",
        "link_time": 1443124003,
        "subject_unique_identifier": "123456789012345678901",
        "provider_protocol": "openid_connect",
        "provider_id": "cpanelid",
        "username": "user"
      }
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "get_users_authn_linked_accounts"
  }
}
 Output (XML)
<result>
    <data>
        <username_linked_accounts>
            <preferred_username>username@example.com</preferred_username>
            <link_time>1443124003</link_time>
            <subject_unique_identifier>123456789012345678901</subject_unique_identifier>
            <provider_protocol>openid_connect</provider_protocol>
            <provider_id>cpanelid</provider_id>
            <username>user</username>
        </username_linked_accounts>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_users_authn_linked_accounts</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
username_linked_accounts
array of hashes
An array of user accounts with their linked identity provider accounts.This hash includes the

preferred_username, link_time, subject_unique_identifier, provider_protocol, provider_id, and username

returns.
 

preferred_username

string

The preferred username of the account on the identity provider that the interface will display.

This function returns this value in the username_linked_accounts hash.

A valid string.
username@example.com

link_time

integer

When the user linked the account.

This function returns this value in the username_linked_accounts hash.

A valid date in Unix time format.
1443124003

subject_unique_identifier

string

The unique identifier for the user at the identity provider.

This function returns this value in the username_linked_accounts hash.

A valid string.
123456789012345678901

provider_protocol

string

The identity provider's protocol.

This function returns this value in the username_linked_accounts hash.

openid_connect
openid_connect

provider_id

string

The system's internal key for the identity provider.

This function returns this value in the username_linked_accounts hash.

A valid string.cpanelid

username

string

The cPanel account's username.

This function returns this value in the username_linked_accounts hash.

A valid cPanel user account.
user