Auth0 Home Blog Docs

/api/v2/clients Fails with error: This operation must be authorized by Auth0

management-api
cli

#1

Hi,

Steps:

  1. I created a new tenant, new machine-to-machine application and gave it access to all scopes for this test.
  2. Generated oauth token using https://test-cli-deploy.auth0.com/oauth/token and above creds for grant_type=client_credentials
  3. Use the token on https://auth0.com/docs/api/management/v2#!/Clients/post_clients with following POST body

    {
    “app_type”: “non_interactive”,
    “client_id”: “wRWdgVjevPBt0biegcOP52Th3cc0nTCd”,
    “cross_origin_auth”: false,
    “custom_login_page_on”: true,
    “grant_types”: [
    “authorization_code”,
    “implicit”,
    “refresh_token”,
    “client_credentials”
    ],
    “jwt_configuration”: {
    “alg”: “RS256”,
    “lifetime_in_seconds”: 36000,
    “secret_encoded”: false
    },
    “name”: “machine-to-machine”,
    “oidc_conformant”: true,
    “sso_disabled”: false
    }

The body is from an another tenant that I want to deploy to this new tenant. Attached screenshot that I get


#2

Removing client_id from the request body fixed it.


#3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.