# Bug OP-7357 - Cannot create user through API with auth_source, but no password

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-7357

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 11.0.0 |
| Observed in versions |  |
| Sprint | 11.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

> Is this actually complete? It says endpoint is added in the feature but the documentation update made with the merge [here](https://github.com/opf/openproject/blob/c498095287925e1f7032c50a787c0e4840bcd7f9/doc/apiv3/endpoints/users.apib) seemed to added a note to specifically say it isn't done. The reason I ask is because I am trying to use the api to create the user and it does not seem to want to accept my lack of password even though I've tried 3 or 4 different methods of passing the LDAP authentication.
> 
> Works:
> 
> new\_user\_dict = {  
>   "login": user\_info.SIGN\_ON\_ID.rstrip().title(),  
>   "email": user\_info.SMTP\_ADDR.rstrip(),  
>   "firstName": user\_info.FIRST\_NAME.rstrip().title(),  
>   "lastName": user\_info.LAST\_NAME.rstrip().title(),  
>   "admin": False,  
>   "language": "en",  
>   "status": "active",  
>   "password": "12345abcde"  ,
> 
> }
> 
> Doesnt work(after removing password key/value):
> 
> "auth\_source": "/api/v3/auth\_sources/1"
> 
> or
> 
> "auth\_source": {'title': 'LDAP', 'href': '/api/v3/auth\_sources/1'}
> 
> or
> 
> '\_links': {"auth\_source": {'title': 'LDAP', 'href': '/api/v3/auth\_sources/1'}}
> 
> or "auth\_source": "1"
> 
> Error:
> 
> 'errorIdentifier': 'urn:openproject-org:api:v3:errors:PropertyConstraintViolation', 'message': "Password can't be blank."

Extracted from comment <https://community.openproject.com/projects/openproject/work\_packages/24503/activity#activity-5>
