ListCredentialProviders

Updated at:

Lists credential providers.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eiam:ListCredentialProviders

list

*CredentialProvider

acs:eiam:{#regionId}:{#accountId}:instance/{#InstanceId}/credentialprovider/*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

NextToken

string

No

The next token.

NTxxxxxexample

MaxResults

integer

No

The maximum number of rows per page in a paged query.

20

CredentialProviderIds

array

No

The list of credential provider IDs.

string

No

The credential provider ID.

atp_01kr2cmj5gxxx4fvmls2e93dxxxxx

CredentialProviderTypes

array

No

The list of credential provider types.

string

No

The credential provider type. Valid values:

  • oauth: OAuth credential provider

  • jwt: JWT credential provider

oauth

Statuses

array

No

The list of credential provider statuses.

string

No

The credential provider status. Valid values:

  • enabled: Enabled.

  • disabled: Disabled.

enabled

Filter

array<object>

No

The list of filters.

object

No

The filter.

Name

string

No

The filter name. Valid values:

  • CredentialProviderName: the credential provider name

  • CredentialProviderIdentifier: the credential provider identifier

CredentialProviderName

Value

array

No

The list of filter values.

string

No

The filter value.

test_example_name

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0441BD79-92F3-53AA-8657-F8CE4A2B912A

TotalCount

integer

The total number of items.

100

NextToken

string

The pagination token returned by the current request.

NTxxxexample

MaxResults

integer

The maximum number of rows per page in a paged query.

20

CredentialProviders

array<object>

The list of credential providers.

array<object>

The credential provider.

InstanceId

string

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

CredentialProviderId

string

The credential provider ID.

atp_01kr2cmj5gxxx4fvmls2e93dxxxxx

CredentialProviderIdentifier

string

The identifier of the credential provider.

test_example_identifier

CredentialProviderName

string

The name of the credential provider.

test_example_name

CreateTime

integer

The time when the credential provider was created. The value is a UNIX timestamp in milliseconds.

1649830225000

UpdateTime

integer

The time when the credential provider was updated. The value is a UNIX timestamp in milliseconds.

1649830225000

Description

string

The description.

This is an example description

CredentialProviderType

string

The credential provider type. Valid values:

  • oauth: OAuth credential provider

  • jwt: JWT credential provider

oauth

CredentialProviderCreationType

string

The creation type of the credential provider. Valid values:

  • system_init: Created by the system.

  • user_custom: Created by a user.

user_custom

Status

string

The credential provider status. Valid values:

  • enabled: Enabled.

  • disabled: Disabled.

enabled

CredentialProviderConfig

object

The configuration of the credential provider.

ProviderCredentialIds

array

The list of credential IDs that correspond to the sensitive configurations of the credential provider.

Note

The system securely stores the sensitive configuration information of the credential provider as credentials.

string

The credential ID that corresponds to the sensitive configuration.

cred_mkv7xxxxd7i4u7zqtzev2mxxxx

OAuthProviderConfig

object

The configuration of the OAuth credential provider.

ClientId

string

The client ID in the OAuth protocol.

client_id_example_xxx

TokenEndpoint

string

The token endpoint of the OAuth protocol.

https://example.com/token

Scope

string

The scope in the OAuth protocol.

Note

The scope configuration of the OAuth credential provider serves as a fallback value. If the scope parameter is not specified when calling the Developer API to obtain an OAuth access token, the token is issued based on the scope configuration of the credential provider.

Important Multiple scope values are separated by spaces.

example:test_01 example:test_02

AuthorizationFlow

string

The OAuth authorization flow type. Valid values:

  • m2m: Machine-to-machine.

  • user_federation: User federation.

m2m

AuthorizationEndpoint

string

The authorization endpoint of the OAuth protocol.

https://example.com/authorize

ProviderVendor

string

The vendor type of the OAuth provider. Valid values:

  • custom: Custom.

  • dingtalk: DingTalk.

  • feishu: Lark.

  • github: GitHub.

  • microsoft: Microsoft.

  • google: Google.

custom

DiscoveryUrl

string

The URL of the OAuth discovery document.

https://example.com/.well-known/openid-configuration

SystemRedirectUri

string

The redirect URI generated by the system.

https://example.com/callback

PkceEnabled

boolean

Specifies whether PKCE is enabled.

true

PkceChallengeMethod

string

The algorithm used to calculate the code challenge in PKCE. Valid values:

  • S256

  • plain

S256

Issuer

string

The issuer endpoint of the OAuth protocol.

https://example.com/issuer

JwtProviderConfig

object

The configuration of the JWT credential provider.

Issuer

string

The JWT issuer.

https://test.issuer.com

JwksEndpoint

string

The JWKS endpoint URL.

https://example123456.aliyunidaas.com/api/v2/auths_ngz2wj35ixxxdyat55nexxxxxx/oauth2/jwks

Expiration

integer

The validity period of the JWT, in seconds.

900

ExpirationCleanupEnabled

boolean

Specifies whether JWT expiration cleanup is enabled.

true

DerivedShortTokenEnabled

boolean

Specifies whether the JWT derived short token capability is enabled.

false

AllowedTokenIssuers

array

The list of allowed JWT issuers.

string

The allowed JWT issuer.

https://test.issuer.com

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "TotalCount": 100,
  "NextToken": "NTxxxexample",
  "MaxResults": 20,
  "CredentialProviders": [
    {
      "InstanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
      "CredentialProviderId": "atp_01kr2cmj5gxxx4fvmls2e93dxxxxx",
      "CredentialProviderIdentifier": "test_example_identifier",
      "CredentialProviderName": "test_example_name",
      "CreateTime": 1649830225000,
      "UpdateTime": 1649830225000,
      "Description": "This is an example description",
      "CredentialProviderType": "oauth",
      "CredentialProviderCreationType": "user_custom",
      "Status": "enabled",
      "CredentialProviderConfig": {
        "ProviderCredentialIds": [
          "cred_mkv7xxxxd7i4u7zqtzev2mxxxx"
        ],
        "OAuthProviderConfig": {
          "ClientId": "client_id_example_xxx",
          "TokenEndpoint": "https://example.com/token",
          "Scope": "example:test_01 example:test_02",
          "AuthorizationFlow": "m2m\n",
          "AuthorizationEndpoint": "https://example.com/authorize\n",
          "ProviderVendor": "custom\n",
          "DiscoveryUrl": "https://example.com/.well-known/openid-configuration\n",
          "SystemRedirectUri": "https://example.com/callback\n",
          "PkceEnabled": true,
          "PkceChallengeMethod": "S256\n",
          "Issuer": "https://example.com/issuer\n"
        },
        "JwtProviderConfig": {
          "Issuer": "https://test.issuer.com",
          "JwksEndpoint": "https://example123456.aliyunidaas.com/api/v2/auths_ngz2wj35ixxxdyat55nexxxxxx/oauth2/jwks",
          "Expiration": 900,
          "ExpirationCleanupEnabled": true,
          "DerivedShortTokenEnabled": false,
          "AllowedTokenIssuers": [
            "https://test.issuer.com"
          ]
        }
      }
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.