Users Created via API Unable to Login

I've worked my way through the Postman tutorial and everything works. I can create new users and enroll them in courses without a problem; however, when I try to log in with these users I get an invalid username/password. In comparing them to another user in the same course that can log in, I don't see anything functionally different. Any ideas? This is my last hurdle to get these to go live.

Answers

  • Renee.J.194
    Renee.J.194 Posts: 93 🧭

    @Jacqueline.M.898 How were the other users created? How do they authenticate?

  • Just received a solution for this. The issue was that we were trying to create the user with the password. The problem is that it doesn't error out so it looks like it works. I need to set the password with a separate call to the API.

  • The other users were created using the bulk upload process. When I compare one of those users side by side with one of the ones created via the API they look exactly the same. Even the enrollments look the same. It's really odd. I tried resetting one of the passwords on the front end as a long shot but that didn't work either.

    Sample csv upload:

    Action

    USERNAME

    Org Defined ID

    First Name

    Last Name

    PASSWORD

    Role Name

    Is Active

    Email

    CREATE

    1234567

    99999999-9999-9999-9999-999999999999

    student

    lastname

    IL9999999

    Learner Elementary (no email or Classlist)

    1

    [email protected]

    Sample JSON:

    {    "OrgDefinedId": "99999999-9999-9999-9999-999999999999",    "FirstName": "student",    "MiddleName": "",    "LastName": "lastname",    "ExternalEmail": "[email protected]",    "UserName": "1234567",    "Password": "IL9999999",    "RoleId": 119,    "IsActive": true,    "SendCreationEmail": false}

    When I look at the users they are active and enrolled in the course. It's really odd.

  • The other users were created using the bulk upload process. When I compare one of those users side by side with one of the ones created via the API they look exactly the same. Even the enrollments look the same. It's really odd. I tried resetting one of the passwords on the front end as a long shot but that didn't work either.

    Sample csv upload:

    Action

    USERNAME

    Org Defined ID

    First Name

    Last Name

    PASSWORD

    Role Name

    Is Active

    Email

    CREATE

    1234567

    99999999-9999-9999-9999-999999999999

    student

    lastname

    IL9999999

    Learner Elementary (no email or Classlist)

    1

    [email protected]

    Sample JSON:

    {    "OrgDefinedId": "99999999-9999-9999-9999-999999999999",    "FirstName": "student",    "MiddleName": "",    "LastName": "lastname",    "ExternalEmail": "[email protected]",    "UserName": "1234567",    "Password": "IL9999999",    "RoleId": 119,    "IsActive": true,    "SendCreationEmail": false}

    When I look at the users they are active and enrolled in the course. It's really odd.