Permissions error on GET /d2l/api/le/1.83/{orgUnitId}/grades/values/descendants/

Ricardo.S.2629
Ricardo.S.2629 Posts: 3 🔍

Hi community, I'm trying to call this new endpoint but I always receive the error 403 "Context user lacks permission to fetch descendant grades in target OrgUnitType."

  • I've tested using various orgUnitId values, including a semester, a course offering, and a section.
  • The OAuth2 application scope grades:gradevalues:read is correctly configured.
  • I'm able to see all grades for al courses on D2L Dashboard.

The environment I'm working on is on the latest version Brightspace Learning Environment v20.25.4.

Do you know if I need an specific permission I'm missing and where I should configure it?

Tagged:

Best Answer

  • Miguel.B.106
    Miguel.B.106 Posts: 14
    edited April 17 Answer ✓

    Hi @Ricardo.S.2629

    Thank you for reaching out to the Brightspace Community!. This looks like an issue related to missing some permissions in the grades tool. Apologies if you have already reviewed this but you may consider checking the following permissions required to retrieve Grades from API calls:

    • See user grade values (API Only)
    • Retrieve Grade Values for Course Offering Descendants (API Only)
    image.png

    We hope this helps and please feel welcome to reach out with more questions!

    Best regards

    Miguel B.

Answers

  • Ricardo.S.2629
    Ricardo.S.2629 Posts: 3 🔍

    Thank you Miguel! Yes, those permissions were missing, I'm now able to call the endpoint successfully. I'm receiving the expected ObjectListPage JSON block containing a list of grade values. However, the grade values are not including the "UserId" and "OrgUnitId" properties.
    Do you know if there's an additional permission required to retrieve these two properties?

  • Bharti.B.332
    Bharti.B.332 Posts: 118

    Hello @Ricardo.S.2629

    I can see that you have a support case open as well. As advised by our team, the issue with the missing properties is not related to permissions. These two properties were added to the Grade.GradeValue object in version 1.83. Our development team has confirmed that the API call was not working as expected, but the issue has been addressed and appears to be fixed in the May release.

    I hope this information helps!

    Thanks and Regards,

    Bharti