Skip to Main Content

API, CLI, SDK & Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OCI login FAILS using API with admin user

Ahmad HarisFeb 29 2024 — edited Mar 19 2024

Hi OCI geeks,

A newbie here!
I am using the python script given here to get all resources for a user.
I was able to run it using the Tenancy user (which is not advisable) but not a test user created with admin permissions.
Is there a Rule or Policy to be applied to the new user for enabling API access?
This admin user already has the permission for API keys generation.
But when I use the key in the config, it gives below error:
'target_service': 'identity', 'status': 404, 'code': 'NotAuthorizedOrNotFound'

Update: I created another user in the DEFAULT domain and added it to default 'Administrators' group and it worked. But still not able to make it work using a test-domain admin user.

MY OCI INFRA:

Compartments(2) - ROOT, C2.

ROOT- domains(2) -> Default, test-domain.

C2- domains(1) -> Default.

Default- users(2) -> tenancyUser, defaultadmin

test-domain- users(1) -> testadmin

and other resources...

Comments
Post Details
Added on Feb 29 2024
0 comments
324 views