cancel
Showing results for 
Search instead for 
Did you mean: 

403 Forbidden error on POST http call after XSUAA Implementation

piyushvns20
Explorer
0 Kudos
142

Hello experts,

I have implemented XSUAA authentication on my sap cap full stack project which is deployed on cloud foundry by following the article of Thomas Jung.
https://developers.sap.com/tutorials/hana-cloud-cap-add-authentication.html

I have also implemented Cloud identity services for user login, for that i have added redirecting uris.

 

{
  "xsappname": "StmPortal",
  "tenant-mode": "dedicated",
  "scopes": [
    {
      "name": "$XSAPPNAME.Admin",
      "description": "Admin"
    }
  ],
  "attributes": [],
  "role-templates": [
    {
      "name": "Admin",
      "description": "generated",
      "scope-references": [
        "$XSAPPNAME.Admin"
      ],
      "attribute-references": []
    }
  ],
  "oauth2-configuration": {
    "credential-types": [
      "binding-secret",
      "x509"
    ],
    "redirect-uris": [
      "http://localhost:5000/**",
      "http://localhost:5000/login/callback**",
      "https://*.applicationstudio.cloud.sap/**",
      "https://*.cfapps.us10-001.hana.ondemand.com/**",
      "https://*.cfapps.us10-001.hana.ondemand.com/login/callback",
      "https://*.trial-accounts.ondemand.com/**",
      "https://*.trial-accounts.ondemand.com/login/callback**"
    ]
  }
}

 

 

I am able to call GET request and fetch the data through my deployed app url after authentication.

piyushvns20_1-1736857442241.png

 

But when i try to call a POST request it give 403 forbidden error.

piyushvns20_0-1736857363113.png

I have also assigned role for the admin.

Please help me to figure it out.

@thomas_jung 

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos