c# - Error when creating a user {"odata.error":{"code":"Request_BadRequest" -
i trying create azure active directory user using adal , error:
{"odata.error":{"code":"request_badrequest","message":{"lang":"en","value":"property value required empty or missing."},"values":null}}
stack trace:
@ system.data.services.client.saveresult.handleresponse() @ system.data.services.client.basesaveresult.endrequest() @ system.data.services.client.dataservicecontext.endsavechanges(iasyncresult asyncresult) @ system.threading.tasks.taskfactory`1.fromasynccorelogic(iasyncresult iar, func`2 endfunction, action`1 endaction, task`1 promise, boolean requiressynchronization) --- end of stack trace previous location exception thrown --- @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess(task task) @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification(task task) @ microsoft.azure.activedirectory.graphclient.extensions.dataservicecontextwrapper.<savechangesasync>d__74.movenext() --- end of stack trace previous location exception thrown --- @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess(task task) @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification(task task) @ system.runtime.compilerservices.taskawaiter.getresult() @ capatechsaasapp.areas.globaladmin.usuariocontroller.<create>d__3.movenext() in c:\proyectos\xx\xx\areas\globaladmin\controllers\usuariocontroller.cs:line 143
my code copy paste sample:
i tried setting language code:
user.preferredlanguage= "en"
but didnt make difference, error doesn't property must set.
after several tries noticed missing property accountenabled set, weird message not clear enough, should property value missing
Comments
Post a Comment