Repository navigation
MyCustomerSecretKey is missing secret_key (secretKey) #768
Description
Activity
You can try to fetch the key after creation using get_customer_secret_key(customer_secret_key_id)
https://docs.oracle.com/en-us/iaas/tools/python/2.152.1/api/identity_domains/models/oci.identity_domains.models.CustomerSecretKey.html#oci.identity_domains.models.CustomerSecretKey@jeliker1
The response from the API should have thesecretKey. What version of the OCI Python SDK are you using? Can you check if the issue goes away after upgrading the SDK version?
Refer Docs: CustomerSecretKeyThanks for the pull request @jeliker1. As mentioned in the Pull reuqest, this is an auto-generated file based on the spec provided by the service team. I will follow up with the service team that owns this API to fix this in their spec. In the meanwhile can you please use the workaround suggested by @adizohar
@github-anurag I'm using
2.153.0. Definitely API does have the value in raw response, but sincesecretKeyis not in theMyCustomerSecretKeymodel it's not be propagated to the SDK response. See my pull request #769 which is to simply add the missing attributes. Also, noteworthy that modelCustomerSecretKey(which you reference) does have thesecretKeyvalue butMyCustomerSecretKeydid not (until my contribution). However, API call to create MyCustomerSecretKey (/admin/v1/MyCustomerSecretKeys) does indeed return thesecretKeyattribute (though SDK response does not).See here: MyCustomerSecretKey
You can try to fetch the key after creation using get_customer_secret_key(customer_secret_key_id) https://docs.oracle.com/en-us/iaas/tools/python/2.152.1/api/identity_domains/models/oci.identity_domains.models.CustomerSecretKey.html#oci.identity_domains.models.CustomerSecretKey
Does not appear that is retrievable
identity_domain_client = oci.identity_domains.IdentityDomainsClient( config, signer=signer, service_endpoint=domain.url ) new_key = oci.identity_domains.models.MyCustomerSecretKey( display_name="SDK", schemas=["urn:ietf:params:scim:schemas:oracle:idcs:customerSecretKey"], ) resp = identity_domain_client.create_my_customer_secret_key( my_customer_secret_key=new_key, ) resp.data.display_name 'SDK' resp.data.id '15a4dfb6489fa82b366095fa9e034e0b' resp2 = identity_domain_client.get_my_customer_secret_key( my_customer_secret_key_id = resp.data.id ) resp2.data.id '15a4dfb6489fa82b366095fa9e034e0b' resp2.data.secret_key resp2.data.access_key 'dba5a6811c08221d28cbedf45c9a46a65c730a79' resp3 = identity_domain_client.get_customer_secret_key( customer_secret_key_id = resp.data.id, attributes = 'access_key,display_name,id,secret_key', attribute_sets = ['all'] ) resp3.data.access_key 'dba5a6811c08221d28cbedf45c9a46a65c730a79' resp3.data.secret_key resp3.data.display_name 'SDK' resp3.data.id '15a4dfb6489fa82b366095fa9e034e0b'
Thank you for checking the retrieval, the team will fix the secret_key in the create secret code.
Reacted by Jon-Eric Eliker (work)@github-anurag I'm using
2.153.0. Definitely API does have the value in raw response, but sincesecretKeyis not in theMyCustomerSecretKeymodel it's not be propagated to the SDK response. See my pull request #769 which is to simply add the missing attributes. Also, noteworthy that modelCustomerSecretKey(which you reference) does have thesecretKeyvalue butMyCustomerSecretKeydid not (until my contribution). However, API call to create MyCustomerSecretKey (/admin/v1/MyCustomerSecretKeys) does indeed return thesecretKeyattribute (though SDK response does not).See here: MyCustomerSecretKey
Odd too that you say the model I updated comes from services team. Why then do you think
CustomerSecretKeymodel correctly includessecret_keyattribute butMyCustomerSecretKeydoes not includesecret_key? When I check public docs I see that neitherCustomerSecretKeynorMyCustomerSecretKeyshowssecretKeyattribute though both should and do return that attribute:@jeliker1
You are correct, the public API docs do not mention the SecretKey in eitherCustomerSecretKeyorMyCustomerSecretKey. I was referring the Python SDK code and docs
Refer code: customer_secret_key modelI have contacted the service team on this issue. The model needs to be fixed via the spec unfortunately, as any manual change would get overridden in the next release.
@jeliker1 You are correct, the public API docs do not mention the SecretKey in either
CustomerSecretKeyorMyCustomerSecretKey. I was referring the Python SDK code and docs Refer code: customer_secret_key modelI have contacted the service team on this issue. The model needs to be fixed via the spec unfortunately, as any manual change would get overridden in the next release.
Thank you for following up on this with me! I hope this isn't too big a change to hope for! Seems like a straightforward "correction" but I'm not sure the API team will agree. Again, hopefully they will… 👍
- addedIdentity DomainsIssue pertains to the Identity Domains serviceIssue pertains to the Identity Domains service
on Jun 23, 2026
Model MyCustomerSecretKey does not include secret_key attribute though it is absolutely returned from the API. I see secret_key is included in CustomerSecretKey model. In both cases the API documentation does not show secret_key is a return value though it absolutely is. Frankly, if it were not in the return the API would be pointless as creating a new key without being able to retrieve the new value is of no use.
Consider this example:
…however, this works:
…so obviously the value for
secretKey(orsecret_key) should be in the response (as I say, otherwise, what's the point of creating the key?).