cancel
Showing results for 
Search instead for 
Did you mean: 

No User Prompt When Testing CAP Project Locally in BAS

mmarkvillanueva
Explorer

Hello,

I'm encountering some issues when performing the exercise related to the CDS Restrictions and Roles. Here is the link for reference: https://learning.sap.com/learning-journey/build-side-by-side-extensions-on-sap-btp/defining-cds-rest...

When testing the project in the BAS local environment, I'm not getting the prompt that will allow me to enter a mock user and password. Here is the expected result:

mmarkvillanueva_0-1683604820166.png

As a result, I'm receiving the 401 Unauthorized error. Note that this is only happening in BAS. Once the CAP Project is deployed to BTP and the role collection is assigned to my User ID, I'm able to run the app successfully.

So it looks like an isolated case when performing some tests locally using mock user. Can you please advise how to address this? Thanks!

View Entire Topic
JWJ
Participant

I found a solution that allows you to change a user. Add `username:password@` before the domain in the URL.

http://usr:pwd@localhost:4004/.

StackOverflow ref: https://stackoverflow.com/questions/50528467/how-to-add-login-credentials-to-url