I solved it myself.
You can cast the EducationResource to an EducationLinkResource
How can I extract the "link" attribute from a EducationSubmissionResource in java?
My students submit github pr's. I want to extract those in java. I can see the "link" attribute when i look at the submission in GraphExplorer with the request
https://graph.microsoft.com/v1.0/education/classes/{id}/assignments/{id}/submissions/{id}/submittedresources.
Here's an image of what i see in Graph Explorer:
However, when I use the java Graph API, I can't seem to get the "link" attribute:
As you can see, "link" is red, because it doesn't exist. In stead I can use "displayName".
The display name is the same as the "link" by default, but students do have the option to give a custom "displayName" when they hand in their assignment (github link) in teams:
So, getting the "displayName" will work in some cases, but it's risky.
Is there any way to get the actual "link" attribute in my java application?
Microsoft Security | Microsoft Graph
1 answer
Sort by: Most helpful
-
Mark Rensen 1 Reputation point
2023-01-14T15:39:47.1466667+00:00