core_user_get_users / core_user_create_users "Access Control Exception"

core_user_get_users / core_user_create_users "Access Control Exception"

by Chuck Yocum -
Number of replies: 2

Hello,


My name is Chuck Yocum, I am the Support Manager at Spatial Business Systems with 20 years of experience writing system integration tools.

I am currently writing an integration between Zendesk and Moodle user account managment.

In Zendesk an agent can select a bunch of fields and this will create the match Moodle account if need be.

I have written a .Net C# api wrapper to call the different Moodle functions as I wish.    My api has no issue getting the course information but I can't get the user functions to work.  


I got tired of trying to find the right security sessions so I have created the latest token as the Admin user to be sure what was going on.


Any suggestions?  

I get the error for example when i use this code posted on another discussion. https://moodle.org/mod/forum/discuss.php?d=210866


Average of ratings: -
In reply to Chuck Yocum

Re: core_user_get_users / core_user_create_users "Access Control Exception"

by Chuck Yocum -

I figured this out.

It was the web service authentation setting

In reply to Chuck Yocum

Re: core_user_get_users / core_user_create_users "Access Control Exception"

by biboy atienza -

I am trying to pull user details using core_user_get_users, using email and id it's working OK, but how to use it if I have a additional field "Person No | personno"?


Getting user details by email address: OK

https://imoodle.sm.com/webservice/rest/server.php?wstoken=WSTOKEN&wsfunction=core_user_get_users&moodlewsrestformat=xml&criteria[0][key]=email&criteria[0][value]=paulmcarney@yahoo.com=paulmcarney@yahoo.com

 

 

Getting user details by id: OK

https://imoodle.sm.com/webservice/rest/server.php?wstoken=WSTOKEN&wsfunction=core_user_get_users&moodlewsrestformat=xml&criteria[0][key]=id&criteria[0][value]=2953

 

QUESTION:

But how to get user details using below optional field/User profile fields| Additional Information? => Person Number/personno with value of 210792

 

<SINGLE>

     <KEY name="type">

          <VALUE>text</VALUE>

     </KEY>

     <KEY name="value">

          <VALUE>210792</VALUE>

     </KEY>

     <KEY name="name">

          <VALUE>Person Number</VALUE>

     </KEY>

     <KEY name="shortname">

          <VALUE>personno</VALUE>

     </KEY>

</SINGLE>

 

Thanks!