Not able to use the OCI Python SDK os_management_client, with a cross tenancy access instance principal setup. I have setup the instance principal, with all the required policies, in both the source and destination tenancy. Do I have to do some additional setups for the OSMS client?
Am using the oci.auth.signers.InstancePrincipalsSecurityTokenSigner for authentication, and am able to access the IdentityClients and ComputeClient in the destination tenancy, from the instance principal in the source tenancy. However, I'm unable to use the OS management client in a similar manner, it returns a 404 error: oci.exceptions.ServiceError: {'target_service': 'os_management', 'status': 404, 'code': 500, 'opc-request-id': '', 'message': 'Authorization failed or requested resource not found', 'operation_name': 'list_available_updates_for_managed_instance', 'timestamp': '2023-05-31T10:25:39.746895+00:00', 'client_version': 'Oracle-PythonSDK/2.93.1', 'request_endpoint': '', '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_500 for more information about resolving this error. Also see https://docs.oracle.com/iaas/api/#/en/os-management/20190801/ManagedInstance/ListAvailableUpdatesForManagedInstance for details on this operation's requirements. If you are unable to resolve this os_management issue, please contact Oracle support and provide them this full error message."}