Reputation: 1
I have a azure connection string Endpoint=https://******.azconfig.io;Id=******;Secret=******
.
I would like to fetch and print (write in a file) all the variables using above string. Is there an API/ way to acheive this?
I looked for many solution. could not find anythingg.
Upvotes: 0
Views: 309
Reputation: 7392
To get key-values from App Configuration store via REST API
, you can check below steps:
Azure App Configuration
API as below:I have taken references from the MSDoc - Azure App Configuration REST API - key-value.
POST https://login.microsoftonline.com/<tenantID>/oauth2/token
grant_type:password
client_id:<appID>
client_secret:<secret>
resource: https://azconfig.io
username: [email protected]
password: xxxxxxxxx
Response:
Now, use this token to call below REST API:
GET https://<appconfig_name>.azconfig.io/kv/?&api-version=1.0
Authorization: Bearer <token_from_above_Step>
Response:
Using the Azure CLI command.
I have taken reference from the MSDoc to retrieve the list.
az appconfig kv list --endpoint Endpoint="https://sriapp.azconfig.io;Id=E6eW;Secret=**********=" --auth-mode key --name sriapp
Output:
Upvotes: 0