Why Does a Cisco DNA Center Script Abort with 401 Unauthorized?
Refer to the exhibit. An administrator writes a script to fetch the list of devices that are registered with Cisco DNA Center. Why does the execution abort? - 
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam tests HTTP status code interpretation in Cisco DNA Center API calls, with 401 Unauthorized specifically pointing to invalid credentials rather than TLS, DNS, or URL issues.
This study guide explains why a Python script using Cisco DNA Center's REST API aborts with a 401 Unauthorized status code, confirming that incorrect username or password is the common cause according to exam community consensus.
Choosing option A (invalid TLS certificate) is a common mistake because SSL errors often cause script failures, but a 401 response is an HTTP status code that only appears after TLS handshake succeeds, indicating authentication failure.
Community Discussion (5 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
A 401 Unauthorized status code is defined by HTTP/1.1 (RFC 7235) to indicate that the request lacks valid authentication credentials. In the context of Cisco DNA Center REST API, this means the script sent a request without proper authentication, often because the username or password provided in the Basic Auth header is incorrect. Comments from the community (e.g., votes with answer B) consistently identify this interpretation, confirming that the 401 response directly points to credential validation failure.
Additionally, the script execution aborts because the API returns an error response, and the code likely raises an exception or exits when it encounters a non-2xx status. Since the question specifically references an exhibit showing a 401 status, the administrator should check the credentials used in the script.
Why the Other Options Are Wrong
Option A (invalid TLS certificate) would cause an SSL/TLS handshake failure, typically resulting in a Python ssl.SSLError or requests.exceptions.SSLError, not an HTTP status code like 401. The script would be unable to connect at all. Option C (hostname unresolvable) would produce a socket.gaierror or DNS resolution error, preventing the HTTP request from being sent. Option D (incorrect authentication URL) would usually yield a 404 Not Found or a different endpoint error, not 401. A 401 response specifically means the request reached the server and authentication was attempted but failed.
Community Comment Notes
Comment [2] succinctly explains that a 401 status code usually indicates unauthorized access, which can happen if the provided username or password is incorrect. Comment [3] reinforces that 401 is returned when authentication credentials are invalid or missing. Comment [4] provides a formal definition of the 401 status code. These comments align with the prompt's vote distribution of 100% B, indicating a strong consensus and clear reasoning among candidates.
Official Reference
Exam Strategy
In Cisco DNA Center API questions, always map HTTP status codes to their exact meanings: 401 = invalid credentials, 403 = insufficient permissions, 404 = wrong endpoint, and SSL/DNS errors occur before HTTP statuses are returned. Look for the status code in any exhibit to quickly eliminate TLS and DNS options.
Related Analysis
Practice All 350-401 Questions
Access 218 questions with complete answers and detailed explanations.
View Full 350-401 Practice Test →