I added a service provider to WSO2IS and use its secret to get an access token, I then use this access token to execute endpoint https://localhost:9443/t/carbon.super/api/server/v1/tenants, but I am getting 403 error. An access token is for the admin user, that as far as I see has all privileges. Why am I getting a forbidden error and how can I fix it?
Asked
Active
Viewed 265 times
0
-
Can you please add the error log also? – sumedhe Jan 12 '21 at 03:31
-
@positron Have you passed the required scopes when generating an access token? See https://stackoverflow.com/a/65371473/10055162. Please confirm that you have passed the required scopes to invoke the mentioned API. Please add the request you used to generate the access token – Anuradha Karunarathna Jan 12 '21 at 03:46
-
Thank you, @AnuradhaKarunarathna that was the issue, and you did mention it before - I forgot about it. Please answer the question so I can mark it as solution. – positron Jan 12 '21 at 04:18
-
@sumedhe I looked at different logs, but they gave no clue about the error, I looked in /repository/logs – positron Jan 12 '21 at 04:21
1 Answers
1
Follow the steps in https://stackoverflow.com/a/65371473/10055162. If you generated the token without passing the required scopes (In your case internal_list_tenants
), you will get 403 Forbidden
response from the REST API call. More info (3)

Anuradha Karunarathna
- 2,717
- 2
- 9
- 17