Symptom
When you try to open the OData Collection in a browser you need to enter the credentials twice. When you try to open the OData collection in any external tools like Postman you get the below mentioned error in first attempt, in second attempt no authorization error is generated.
" 401 Unauthorized"
Environment
SAP Cloud for Customer
Reproducing the Issue
Using Browser:
-
Open a Browser
- Enter the OData Collection URL for e.g.: https://myxxxxxx.crm.ondemand.com/sap/c4c/odata/v1/c4codata/UserCollection
- It will ask for Sign In
- You enter the credentials
- It again goes back to Sign In pop up screen
- After entering the same credentials for the second time it works fine
Using External Tool Postman:
- Go to Postman tool
- Enter the credentials you receive above mentioned error
- Entre the same credentials for the second time and Authorization passes
Cause
This may occur when you have reset the password and you are using the temporary password, you may validate the same by Login to the Cloud For Customer application.
The system will prompt you to change the password.
Resolution
Change the password and use the new credentials, you will be authorized in first attempt.
Keywords
401 unauthorized, Enter password twice, Odata authentication fail , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem