With a little knowledge of CRM, we were instructed to expose data and other features from CRM 2011. We developed a RESTful wrapper that allows other developers to use it in their applications. Some sample endpoints could be:
API/v2/Accounts(someguid)
API/v2/Lead/Create {json object}
etc
This application needs to be updated to support the dynamics of 2016. We launched the 2011 application and simply changed the configuration variable, pointing to the instance of 2016. So far, we could not do anything, because immediately after the second line below:
var context = new XrmServiceContext(_organizationService);
var crmUser = (from systemUser in context.SystemUserSet
where systemUser.DomainName == user.DomainUserName
select systemUser).FirstOrDefault();
I get authentication of failed exceptions:

Is this really a known authentication issue when upgrading from 11 to 16, or am I missing something?