does not authenticate the correct user (there can be a typo, etc.), or
userContext = new IdcContext(user);
Then I defined the same user - user1 in the UCM console as global user and added roleThis looks like a problem. Just try to log in with this user to WebCenter Content web gui and you will see what happens.