User enrollments API call not returning enrollments with role "Student"

Lily.C.6690
Lily.C.6690 Posts: 4 🌱
edited February 5 in Higher Ed / Postsecondary

Hello,

I'm currently working with Server-to-Server Oauth2 and have run into an issue pulling enrollment. I cannot get enrollments where a user's role is "Student", with the exception of the Organization. This is limited to calls using the /d2l/api/lp/ routes. Our Service User has been given full permissions to everything while we try to figure this out.

For Example, say I have a user who has the student role for the organisation, and is enrolled in the following "Course Offerings": A as "Course Supervisor", B as "Course Supervisor", C as "Student", and D as "Student".
If I do the call GET /d2l/api/lp/(version)/enrollments/users/(userId)/orgUnits it will return the organization and courses A and B only. There are no other results to be pulled using the Bookmark either.
If I then do the call GET /d2l/api/lp/(version)/enrollments/orgUnits/(orgUnitId)/users/ on course C, the user does not appear in the list; Only users with other roles appear (ex. Administrator, Instructor, Course Supervisor). However, if I use the classlist API call GET /d2l/api/le/(version)/(orgUnitId)/classlist/ for Course C, it returns the classlist, including the users with the role Student.

Is there something specific that the Learning Platform api needs but the Learning Environment API does not? What's strange to me is that it's the only role that isn't being pulled for those enrolment calls (we have like 6+ roles set up).

Answers

  • Hello Lily, thanks for your question!

    I was chatting with a colleague about this and we seem to think this may be a permission issue with the account that's being used to make the API call. Unfortunately without seeing your system/settings/etc. it's difficult to assess.

    I would start by verifying that the role which will be completing this work does have full Roles & Permissions access to the Users tool > Search for all available roles, especially at the Course Offering level.

    If that all looks fine, you may want to open a case with our Support team to have them also check where the problem may be.

    Sorry we can't provide any more concrete answer!

    ~Stephen

  • Lily.C.6690
    Lily.C.6690 Posts: 4 🌱

    Thanks for the reply. We checked the service user permissions, and they are set to view enrollments for Course Offerings. We don't see any settings specific to Course Offering enrollments for students. Searching for students and their enrollment is enabled. We've made a ticket with support about the issue.

    I noticed that when I get the classlist through  /d2l/api/le/(version)/(orgUnitId)/classlist/, for students only, the "roleId" value is blank. It's very strange to us that it's limited to students and Course Offerings. We were able to enroll a student into a department, and it appeared when pulling the student's enrollments. Hopefully, support will be able to resolve the issue.

  • Sangeetha.T.629
    Sangeetha.T.629 Posts: 184 🤝🏼 image

    Hi @Lily.C.6690 ,

    Thanks for your update and for performing additional testing on this issue. I can see that your admin team, Daniel, has already raised a support case for this matter.

    Our team is actively working on it, and all updates and responses will be provided through the support case. I would recommend reaching out to Daniel directly if you have any follow‑up questions regarding the updates he receives from Support.

    If you still have any additional questions in the meantime, please feel free to reach out to me here in the Community. I’m happy to review and provide further assistance as needed.

    Thanks,

    Sangeetha

  • Lily.C.6690
    Lily.C.6690 Posts: 4 🌱

    Thanks, the issue has now been resolved :)