I use the Moodle API and GetToken to log-in with a user. Then I retrieve the categories information here:
api.GetCategories(siteInfo.Userid, categories =>
if (categories.Length > 0)
foreach (var category in categories)
// Save category info.
However, category.Idnumber returns null. It shouldn't be null, it's definitely filled in.
Is it an issue with account privilege? Or what could it be..?