cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

App Settings V2 Issue

MostafaHussein
Champion

I'm facing issue when using App Settings V2, as I've followed this guide carefuly https://developer.dynatrace.com/develop/data/store-app-settings/ to define Schema named "oauth-credentials", secrets and local values.

1st) the issue that I've tried to retrieve app settings through useAppSettingsV2 and get the below Error

MostafaHussein_0-1753956501731.png

2nd) as a workaround I've tried using settings client "appSettingsObjectsClient.getAppSettingsObjects" to be called within App Function and got the following error "'oauth-clients' not found for app version '0.0.0'":

MostafaHussein_1-1753957013855.png

this is the code

 

import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings-v2";

export default async function (payload: unknown = undefined) {
  const data =
    await appSettingsObjectsClient.getAppSettingsObjects({
      schemaId: 'oauth-clients',
      addFields: 'summary, schemaId'
    });
  return data;
}

 

 

3) Finally, I've tried to access it the platform service API "http://localhost:3000/platform/app-settings/v2/effective-values?schema-id=oauth-clients&add-fields=s...  with adding "Dt-App-Version" as shown in the previous error and got the same error.

MostafaHussein_0-1753959233216.png

 

this is the app.config.json

MostafaHussein_3-1753957474273.png

 

this is the schema definition that located in "/settings/schemas/oauth-clients.schema.json"

{
    "$schema": "https://developer.dynatrace.com/docs-assets/schema_strict_apps.json",
    "dynatrace": "1",
    "schemaId": "oauth-clients",
    "version": "1.0.0",
    "displayName": "Allows you to configure connections to a fictional messaging service",
    "description": "",
    "multiObject": false,
    "summaryPattern": "oauth credential is {credential_id}",
    "ordered": false,
    "properties": {
      "credential_id": {
        "displayName": "oAuth2 Credential Vault ID",
        "description": "Credential vault ID of stored OAuth2 client credentials",
        "type": "secret",
        "default": "",
        "nullable": false
      }
    }
  }

 

appreciate your advice if I missed something in schema configuration or if anyone faced these before or not.

Certified Dynatrace Professional | Certified Dynatrace Services - Observability | Certified Dynatrace Services - App Developer
Dynatrace Partner 2p.com.sa
1 REPLY 1

MostafaHussein
Champion

plugin item was listed under app, I've moved it to be under the root object 🤔😲🤗 then all things has worked!!

MostafaHussein_3-1754030563254.png

Certified Dynatrace Professional | Certified Dynatrace Services - Observability | Certified Dynatrace Services - App Developer
Dynatrace Partner 2p.com.sa

Featured Posts