.NET SDK: AuthClient.Execute Skip to main content
https://support.okta.com/help/answers?id=906f0000000hzo7iac&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:
Patrick CesardPatrick Cesard 

.NET SDK: AuthClient.Execute

Hello.
I am using the AuthClient.Execute Method (http://developer.okta.com/docs/sdk/core/csharp_api_sdk/html/2fa49a0f-1caa-3ae2-4a71-07fed35a1f03.htm) to have a SMS code sent to my mobile device as described in the API (http://developer.okta.com/docs/api/resources/factors.html#verify-sms-factor)
however the method is throwing an error even though the SMS code is sent to my device! So it works (i get the code) but it throws an exception which I'm currently trapping in my code. The error is:

"Unable to deserialize the response properly"
at Okta.Core.Utils.Deserialize[T](String value)\r\n   at Okta.Core.Utils.Deserialize[T](HttpResponseMessage response)\r\n   at Okta.Core.Clients.AuthClient.Execute(String stateToken, Uri uri, ApiObject apiObject)\r\n   at Okta.Core.Clients.AuthClient.Execute(String stateToken, Link link, ApiObject apiObject)


 
Jaypee ManansalaJaypee Manansala (Okta)
Hi Patrick,

Thanks for posting your inquiries in Okta Communtiy. The AuthClient class does not work on Staging Org (oktapreview.com). It only works for Production Org (okta.com). You may check this link and hoping it will be a help: https://gist.github.com/raphaellondner-okta/0399ecd1103ecf266377

Please let me know if you need any additional information. Thank you.

Best,

JP