Credential - Get

Retrieve the credential identified by credential name.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName}?api-version=2023-11-01

URI Parameters

Name In Required Type Description
automationAccountName
path True

string

The name of the automation account.

credentialName
path True

string

The name of credential.

resourceGroupName
path True

string

Name of an Azure Resource group.

Regex pattern: ^[-\w\._]+$

subscriptionId
path True

string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

Responses

Name Type Description
200 OK

Credential

OK

Other Status Codes

ErrorResponse

Automation error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get a credential

Sample request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/credentials/myCredential?api-version=2023-11-01

Sample response

{
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/credentials/myCredential",
  "name": "myCredential",
  "properties": {
    "userName": "mylingaiah",
    "description": "my description goes here",
    "creationTime": "2017-03-26T21:04:10.27+00:00",
    "lastModifiedTime": "2017-03-26T21:04:16.423+00:00"
  }
}

Definitions

Name Description
Credential

Definition of the credential.

ErrorResponse

Error response of an operation failure

Credential

Definition of the credential.

Name Type Description
id

string

Fully qualified resource Id for the resource

name

string

The name of the resource

properties.creationTime

string

Gets the creation time.

properties.description

string

Gets or sets the description.

properties.lastModifiedTime

string

Gets the last modified time.

properties.userName

string

Gets the user name of the credential.

type

string

The type of the resource.

ErrorResponse

Error response of an operation failure

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.