cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3194
Views
0
Helpful
1
Replies

Unable to authenticate via API

Ben Clifton
Level 1
Level 1

Hi all,

I'm able to successfully login to the APIC with a particular set of credentials via the GUI, but when I try to login via the API I get "Username or password is incorrect - FAILED local authentication".

Below is the request I'm making, along with the response:

Request

URI:

https://[APIC]/api/aaaLogin.json

Body:

{"aaaUser": {"attributes": {"name": "username", "pwd": "password"}}}

Response

{

    "totalCount": "1",

    "imdata": [

        {

            "error": {

                "attributes": {

                    "code": "401",

                    "text": "Username or password is incorrect - FAILED local authentication"

                }

            }

        }

    ]

}

Is the APIC trying to authenticate this user against the local user store rather than TACACS+?

1 Accepted Solution

Accepted Solutions

Ben Clifton
Level 1
Level 1

Sorry everyone. I should have read the doco more closely.

"aaaLogin—Sent as a POST message, this method logs in a user and opens a session. The message body contains an aaa:User object with the name and password attributes, and the response contains a session token and cookie. If multiple AAA login domains are configured, you must prepend the user's name with apic:domain\\."

View solution in original post

1 Reply 1

Ben Clifton
Level 1
Level 1

Sorry everyone. I should have read the doco more closely.

"aaaLogin—Sent as a POST message, this method logs in a user and opens a session. The message body contains an aaa:User object with the name and password attributes, and the response contains a session token and cookie. If multiple AAA login domains are configured, you must prepend the user's name with apic:domain\\."