Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Connections

Get a connection with credentials

POST /connections/{name}/getConnectionWithCredentials

Retrieves the specified connection together with its credential values.

Query parameters

api-version string required

The API version to use for this operation.

Path parameters

name string required

The friendly name of the connection, provided by the user.

Header parameters

x-ms-client-request-id string

An opaque, globally-unique, client-generated string identifier for the request.

Responses

The request has succeeded.

Headers

x-ms-client-request-id string

An opaque, globally-unique, client-generated string identifier for the request.

Body

Content-Type: application/json
name string required

The friendly name of the connection, provided by the user.

id string required

A unique identifier for the connection, generated by the service

type string | enum required

The Type (or category) of the connection

Any of the following:
string
enum
AzureOpenAIAzureBlobAzureStorageAccountCognitiveSearchCosmosDBApiKeyAppConfigAppInsightsCustomKeysRemoteTool_PreviewOpenAPIRemoteA2A
target string required

The connection URL to be used for this service

isDefault boolean required

Whether the connection is tagged as the default connection of its type

credentials ApiKey | AAD | CustomKeys | SAS | None | AgenticIdentityToken_Preview required

A base class for connection credentials

One of the following:
ApiKey ApiKeyCredentials

API Key Credential definition

type enum required

The credential type

ApiKey
key string

API Key

AAD EntraIDCredentials

Entra ID credential definition

type enum required

The credential type

AAD
CustomKeys CustomCredential

Custom credential definition

type enum required

The credential type

CustomKeys
SAS SASCredentials

Shared Access Signature (SAS) credential definition

type enum required

The credential type

SAS
SAS string

SAS token

None NoAuthenticationCredentials

Credentials that do not require authentication

type enum required

The credential type

None
AgenticIdentityToken_Preview AgenticIdentityPreviewCredentials

Agentic identity credential definition

type enum required

The credential type

AgenticIdentityToken_Preview
metadata object required

Metadata of the connection

[key: string] string

Client error

Headers

x-ms-error-code string

String error code indicating what went wrong.

Body

Content-Type: application/json
error Azure.Core.Foundations.Error required

The error object.

code string required

One of a server-defined set of error codes.

message string required

A human-readable representation of the error.

target string

The target of the error.

details Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.

code string

One of a server-defined set of error codes.

innererror Azure.Core.Foundations.InnerError

Server error

Headers

x-ms-error-code string

String error code indicating what went wrong.

Body

Content-Type: application/json
error Azure.Core.Foundations.Error required

The error object.

code string required

One of a server-defined set of error codes.

message string required

A human-readable representation of the error.

target string

The target of the error.

details Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.

code string

One of a server-defined set of error codes.

innererror Azure.Core.Foundations.InnerError

Request

POST /connections/{name}/getConnectionWithCredentials HTTP/1.1

Response

Status: 200
Content-Type: application/json
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json
en-us
Your Privacy Choices
  • AI Disclaimer
  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Consumer Health Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2026