cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Who Me Too'd this topic

DNAC Sandbox 'Role does not have valid permissions to access the API'

Hi Guys,

I am trying to get over the exercises of DataKnox (CBT) for the DNAC Center.

But in many of them I am getting the following error.

403

'{"message":"Role does not have valid permissions to access the API"}\n'

for instance in the cli_runner

I am using the DNA Sandbox from Cisco.

 

base_url = "https://sandboxdnac2.cisco.com/dna"
auth_endpoint = "/system/api/v1/auth/token"

username = 'devnetuser'
password = 'Cisco123!'

auth_headers = {
    "Content-Type": "application/json",
    "Accept": "application/json"
}

auth_response = requests.post(url=f"{base_url}{auth_endpoint}", auth=(
    username, password), headers=auth_headers, verify=False).json()

Is there a way I can complete the exercises?

 

Please let me know.

 

Who Me Too'd this topic