Why is "Email" returned as null in the Enrollment.ClasslistUser list result after calling GET...
Why is "Email" returned as null in the Enrollment.ClasslistUser list result after calling GET /d2l/api/le/(version)/(orgUnitId)/classlist/?
These same users have email which shows up in User.UserData and User.UserProfile. But for some reason it does not get populated in Enrollment.ClasslistUser. This is what I get:
'Identifier' = {str} '187'
'ProfileIdentifier' = {str} 'lylQOAujgs'
'DisplayName' = {str} 'Lastname, Firstname'
'Username' = {NoneType} None
'OrgDefinedId' = {str} ''
'Email' = {NoneType} None
'FirstName' = {str} 'Firstname'
'LastName' = {str} 'Lastname'
'RoleId' = {NoneType} None
'LastAccessed' = {NoneType} None
'IsOnline' = {bool} False
The API doc indicates:
UserName, OrgDefinedId, Email, LastAccessed
The back-end service can constrain the visibility of these properties through configuration of the Classlist tool. If these values are configured to be eligible to appear in the classlist for an org unit, then the API can return these values to the calling user (also assuming that the calling user’s role has permission to see those values).
I checked the Classlist tool and I see no way of exposing email. My user is super administrator and I am using Oauth2 scope "core:*:* enrollment:*:*". so permissions should be fine.
What does it take to see the email in the Enrollment.ClasslistUser without having to call other APIs to get it?
Thank you.
Answers
-
Figured it out... On your Brightspace page:
- Cog
- Configuration Variable Browser
- Tools (on the left tree)
- Classlist
- Add a setting choosing the Org unit the setting applied to, then selecting "on" from the boolean option