cancel
Showing results for 
Search instead for 
Did you mean: 

Authentification failed with custom user

mtbiker_18
Champ in-the-making
Champ in-the-making
Hi,

I've created a new user in alfresco.Giving him the role of coordinator.
When I want to connect with the webservice api :

AuthenticationUtils.startSession(user, pwd);

I get the following error Smiley Surprisedrg.alfresco.repo.security.authentication.AuthenticationException: 04030165 Failed to authenticate

With user admin I have no problem

anyone an idea?
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
Can you share with us the snippet of your Java code?

mtbiker_18
Champ in-the-making
Champ in-the-making
try {
            String alfrescoHost = ConfigurationUtils.getConfigProperty(ParameterKeys.ALFRESCO_HOST);
            WebServiceFactory.setEndpointAddress(alfrescoHost);
          
            TechnicalUser techUser = getUserService().findTechnicalUserAlfresco(ctx.getCaller());
            AuthenticationUtils.startSession(techUser.getName(), techUser.getPassword());
        } catch (SamlIdpException e) {
            LOGGER.error("user service findTechnicalUser not available", e);
            throw new OnlineIOException(OnlineIOTechnicalErrorCodes.ALFRESCO_AUTH_ERROR.toString(),
                    CategoryType.TECHNICAL, e);
        } catch (Exception e) {
            LOGGER.error("user service exception", e);
            throw new OnlineIOException(OnlineIOTechnicalErrorCodes.ALFRESCO_AUTH_ERROR.toString(),
                    CategoryType.TECHNICAL, e);
        }