command-line-interfaceoracle-cloud-infrastructure

CLI returns NotAuthorizedOrNotFound


I am attempting to use CLI. I have a Window 2016 VM and need to attach a Block Volume to it. Every time I use the oci commands I get

{
  "code": "NotAuthorizedOrNotFound",
  "message": "Authorization failed or requested resource not found",
  "opc-request-id": "89A63D37EBAB44109585528869D27C6C/147FC206ECC6D799FB836D9A2ECABF6F/112AABF608CD03C4B9CE555F8AE24330",
  "status": 404
}

I have entered the user OCID, tenancy OCID, and region. Also generated a key pair and added that to my user in MyServices dashboard.

With the exception of using oci iam compartment list -c, all other commands return NotAuthorizedOrNotFound

What am I missing?

FYI - This answer did not answer/fix my particular issue because I did add the compartment ID.


Solution

  • Your authentication configuration is correct as of now, because otherwise you would be getting a 401 error.

    There are a couple issues that would lead to the issue you are seeing: