Enrollment API call failing with a specific user role type

Options

We are experiencing an issue when trying to enroll a user with a specific type of User role. The endpoint that is being used is POST /d2l/api/lp/1.9/enrollments. The process is supposed to create a demo student for a course and has been working for a few years, but since near the end of January the enrollment call has been failing. I tried to make the call that is failing in Postman but it returns a 403 Forbidden Message: Not Authorized. If I change the UserId to my d2l userid, the call works as expected. I'm wondering if there's an issue with the demo student role (which has worked no problem until recently) or if something has changed on the d2l side. Does anyone have any ideas? 

Tagged:

Answers

  • Rusha.S.831
    Options

    Hello @Bobby.Ross3522 ,

    Thank you for contacting us via Brightspace Community!

    The 403 error is usually caused by insufficient permission to create enrollment. May I suggest you verify if you have set the permission to 'Enroll '[role]' for this particular role and see if this helps?

    Kind Regards,

    Rusha

  • Robert.R.757
    Robert.R.757 Posts: 7 🌱
    Options

    Hello Rusha,

    Thank you for the suggestion. I checked the role that is being used with the API and confirmed that it has the permissions set to allow 'Enroll 'DemoStudent' but it is still not working. This is confusing as we haven't changed any settings recently and it is no longer working.

    Thanks,

    Bobby