Question
If you have seen this documentation you may have noted that ‘On Premises SharePoint Apps and Configuration or the User Profile' which relates to 401 errors it states that an SID is required at the least. If you check your User Profile Properties you may notice that you don't have one. Is that a problem?
Answer
No. This would be a problem with the K2 for Sharepoint app, but Appit is different. In the case of Appit it is the UPN that is required (not the SID) as it is the UPN that will get used to request an OAuth token.