.NET API - Calling UsersClient.SetRecoveryQuestion() throws exception if recovery question already exists Skip to main content
https://support.okta.com/help/answers?id=9062a000000bmavqaa&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Chin BaeChin Bae 

.NET API - Calling UsersClient.SetRecoveryQuestion() throws exception if recovery question already exists

Is this the expected behavior? If so, is there anyway to overwrite the existing recovery question/answer? We don't want to use UsersClient.ChangeRecoveryQuestion() since this method requires knowing the user's current password. Also, is there a way to delete the existing recovery question if it already exists in order to use the SetRecoveryQuestion() method without the exception?
James FloresJames Flores (Okta, Inc.)
Hi Chin, 

I took a look at both UsersClient.ChangeRecoveryQuestion Method and UsersClient.SetRecoveryQuestion Method (User, String, String) at the following locations respecfully http://developer.okta.com/docs/sdk/core/csharp_api_sdk/html/40ccfc98-c9ce-0d09-c933-539bf89b2273.htm, http://developer.okta.com/docs/sdk/core/csharp_api_sdk/html/5f17e78c-91e5-2ec1-85b5-8f6909f0b279.htm

And do see that they both apear to require the users password, where as an API call with a token ({{url}}/api/v1/users/{{userId}}/credentials/change_recovery_question) does not. 

Perhaps you could create a support case with the full response header and our support team can take a look and determine if this is in fact expected behavior.