Container Apps - Get Auth Token
Get auth token for a container app
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/getAuthtoken?api-version=2023-08-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
container
|
path | True |
string |
Name of the Container App. |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
404 Not Found |
Not found. |
|
Other Status Codes |
Common error response. |
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 Container App Auth Token
Sample request
POST https://management.azure.com/subscriptions/651f8027-33e8-4ec4-97b4-f6e9f3dc8744/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerapp0/getAuthtoken?api-version=2023-08-01-preview
Sample response
{
"id": "/subscriptions/651f8027-33e8-4ec4-97b4-f6e9f3dc8744/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerapp0",
"name": "testcontainerapp0",
"type": "Microsoft.App/containerApps/accesstoken",
"location": "East US",
"properties": {
"token": "testToken",
"expires": "2022-07-14T19:22:50.3080223Z"
}
}
Definitions
Name | Description |
---|---|
Container |
Container App Auth Token. |
created |
The type of identity that created the resource. |
Default |
App Service error response. |
Details |
Details or the error |
Error |
Error model. |
system |
Metadata pertaining to creation and last modification of the resource. |
ContainerAppAuthToken
Container App Auth Token.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
location |
string |
The geo-location where the resource lives |
name |
string |
The name of the resource |
properties.expires |
string |
Token expiration date. |
properties.token |
string |
Auth token value. |
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
tags |
object |
Resource tags. |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
DefaultErrorResponse
App Service error response.
Name | Type | Description |
---|---|---|
error |
Error model. |
Details
Details or the error
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
Error
Error model.
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
details |
Details[] |
Details or the error |
innererror |
string |
More information to debug error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |