cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
585
Views
0
Helpful
8
Replies

FMC Sandbox API - No Devices & Authorization Error

mdusman
Level 1
Level 1

I am using the Cisco FMC Sandbox API Explorer on the Always-On Sandbox (Sandbox URL), but I am experiencing issues when querying device records and checking task statuses.


API Calls & Errors:

Checking Device Registration Status:

GET {{protocol}}://{{hostname}}/api/fmc_config/v1/domain/{{domain_id}}/job/taskstatuses/{{device_registration_task_id}}

Response:

{
    "error": {
        "category": "FRAMEWORK",
        "messages": [
            {
                "description": "The user is not authorized"
            }
        ],
        "severity": "ERROR"
    }
}
  • Issue: I am receiving an authorization error, even though I am using the API Explorer with the correct credentials.

Checking Registered Devices:

GET {{protocol}}://{{hostname}}/api/fmc_config/v1/domain/{{domain_id}}/devices/devicerecords?expanded=True

Response:

{
  "links": {},
  "paging": {
    "offset": 0,
    "limit": 0,
    "count": 0,
    "pages": 0
  }
}
  • Issue: The response is empty, even though the sandbox is supposed to have two Firepower Threat Defense (FTD) sensors preconfigured.

Questions:

  1. Why am I getting an "Unauthorized" error when checking task statuses?

    • Do I need additional permissions, or is this a known limitation of the Always-On Sandbox?
  2. Why are no devices appearing when querying devices/devicerecords?

    • Is there an issue with the current sandbox environment, or should I reserve a new instance?

Any guidance on troubleshooting this would be greatly appreciated. Thanks in advance!

8 Replies 8

@mdusman did you generate a token? https://<management_center_IP_or_name>/api/fmc_platform/v1/auth/generatetoken.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Hi @bigevilbeard , thanks for the response. 

Yes I have. Getting Access Policies worked fine but Other than Devices returns empty and registration status task endpoint also giving User not authorized issue. 

@mdusman just tested also, reply back is the same, i tried to get the tasks also.... as well as your first call same error as below.

 

python fmc_task_lists.py
Authentication successful! Access token and domain UUID retrieved.
Access Token: 45b2df3e-6457-4061-880a-5df948338c04
Domain UUID: e276abec-e0f2-11e3-8169-6d9ed49b625f
Failed to retrieve tasks. Status code: 403
{"error":{"category":"FRAMEWORK","messages":[{"description":"The user is not authorized"}],"severity":"ERROR"}}

 

Getting the devices 

 

✦ ❯ python fmc_devices.py
Authentication successful! Access token and domain UUID retrieved.
Access Token: f0dd0eb7-f2e8-4248-851b-4c700dba92c0
Domain UUID: e276abec-e0f2-11e3-8169-6d9ed49b625f
Device records retrieved successfully!
{'links': {}, 'paging': {'offset': 0, 'limit': 0, 'count': 0, 'pages': 0}}

 

I saw a pop up in the UI which said 'no devices attached' i cannot recall how i saw this tho, it flashed up. Guess team will need to advise here.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Did you try Devices endpoint on Sandbox environment? 

@mdusman Checking Device Registration Status? Yes same error as you.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Thanks for the feedback @bigevilbeard , can I contact support for this?

@mdusman the Devnet team monitor this space, it’s Cisco Live this week so they might be busy keeping the lights on for the sandbox there. I’m sure they will pick this up

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

mdusman
Level 1
Level 1

Okay, Thanks for the response. Have a good weekend