Making an inbound API call fails for a specific user with Error: Basic authentication failed for user even after passing the correct username and password. Login using same username and password works fine when login via browser.
This was a password issue. When login via browser, authentication was performed via SSO and used password works fine. But, when making an API call, SSO is not used and authentication is made locally from instance. In this case, used password is not stored locally in sys_user table therefore, basic authentication fails.
Updated the sys_user record of user S569225 with same password that you're using for OKTA login and it works now. We preferred the same OKTA password considering the fact if your sys_user records are synced with OKTA on a daily basis and if it sync the password field, there will be no new password value and this solution should continue work.