Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCI document understanding service throws NotAuthorizedOrNotFound exception when permission is already provided #538

Open
lmpeiris opened this issue Feb 7, 2025 · 0 comments

Comments

@lmpeiris
Copy link

lmpeiris commented Feb 7, 2025

While following the tutorial provided at https://github.com/oracle-samples/oci-data-science-ai-samples/tree/main/labs/ai-document-understanding/workshops we are getting following error. The code for the tutorial is provided in https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai_services/document_understanding/python/text_extraction/object_storage_text_extraction_demo.py

oci.exceptions.ServiceError: {'target_service': 'ai_service_document', 'status': 404, 'code': 'NotAuthorizedOrNotFound', 'opc-request-id': 'B066D3F6F3DA413FABFEC74182272335/1189EBD93D14DAFFC69519BCF1A966DA/ED8EDBEFFC8B56C9C135495E4B214549', 'message': 'Authorization failed or requested resource not found.', 'operation_name': 'create_processor_job', 'timestamp': '2025-02-03T12:47:28.249714+00:00', 'client_version': 'Oracle-PythonSDK/2.143.1', 'request_endpoint': 'POST https://document.aiservice.ap-mumbai-1.oci.oraclecloud.com/20221109/processorJobs', 'logging_tips': 'To get more info on the failing request, refer to https://docs.oracle.com/en-us/iaas/tools/python/latest/logging.html for ways to log the request/response details.', 'troubleshooting_tips': "See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_404__404_notauthorizedornotfound for more information about resolving this error. Also see https://docs.oracle.com/iaas/api/#/en/document-understanding/20221109/ProcessorJob/CreateProcessorJob for details on this operation's requirements. If you are unable to resolve this ai_service_document issue, please contact Oracle support and provide them this full error message."}

Below are the iam permissions provided for the user account

allow group mygroup to use ai-service-document-family in tenancy
allow group mygroup to inspect compartments in tenancy
allow group mygroup to manage object-family in compartment mycompart
allow group mygroup to read all-resources in compartment mycompart

There is no issue with permissions on the python script as user is able to list buckets etc.. in the compartment.
Attempting the UI also throws the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant