API enrolment at department level and above?

Options
I am attempting to enrol a user within a department OU using the Valence API. When I invoked the enrollments endpoint specifying the ID for a course offering OU, the enrolment occurs. However, if I try the same call while specifying the ID for a department OU I receive a forbidden response.

Can the enrollments endpoint enrol users in OUs at the department level or above? If not, is there another endpoint that can do so?

Our use case is to have some users enrolled at the department, or above, with cascading roles to access course templates, course offerings, and so forth.

Answers

  • Chris.S.534
    Options

    Hi Rob,

    You can enrol a user into a Department org unit or any other Org Unit using POST /d2l/api/lp/(version)/enrollments/

    Double check you've ticked the boxes noted in the introductory paragraphs of
    https://docs.valence.desire2learn.com/res/enroll.html#post--d2l-api-lp-(version)-enrollments-

    As long as your API Service User role (or similar) has the right role permissions, you App has the right scopes etc. ensure under the Role Interactions for the role you are attempting to enroll the user into, at the Department and/or upper org unit levels:

    • Search for '{role name}' is ticked
    • Enroll '{role name}' is ticked

    Hope that helps!