Changing project type to Portable Class Library BROKE Okta.core.client Skip to main content
https://support.okta.com/help/answers?id=9062a000000bm9gqaq&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:
Rick WilliamsRick Williams 

Changing project type to Portable Class Library BROKE Okta.core.client

Hi -- I'm looking for guidance on an issue I ran into this morning.  Okta.core.client 0.2.9 nor 0.3.1 is not working with a new portable class library that targets xamarin.ios and xamarin.android.  Same code works fine with my non-PCL project... Is okta.core.client really PCL-compatible??

If I try to get a User object back I get the a deserialize exception: 
Exception Message: Unable to deserialize the response properly
Exception InnerException: Object must implement IConvertible.



Code:
User oktaUser = GetUsersClient().Get("email@address.com");



Stack Trace:
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Okta.Core.OktaJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonConverter[] converters)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonConverter[] converters)
   at Okta.Core.Utils.Deserialize[T](String value)

 
Josh SkeenJosh Skeen (Okta)
Hi Rick,

What is the name of the new portable class library that you have changed over to? I will likely need to take a look at the class library itself and see if this is compatible with our current configuration. I will also run this by our Developer Support team as well to see if they have any further suggestions regarding this for you.

Thank you,

Josh Skeen
Okta Support