Bug: createdDateTime is null in /beta/users - microsoft-graph-api

When calling the Microsoft Graph API to get a specific user, the createdDateTime field is returned without any data.
https://graph.microsoft.com/beta/users/user#domain.com
However, when searching for the user, the field is returned correctly.
https://graph.microsoft.com/beta/users?$filter=startsWith(userPrincipalName, 'user#domain.com')
The bug can be reproduced using the GraphExlorer web-site: https://developer.microsoft.com/en-us/graph/graph-explorer
I'm not sure where to report this, so I posted it here.

I think I might have found the answer.
When I do a GET operation using the Azure AD 'id' the createdDateTime is populated. When I retrieve the same user using the userPrincipalName, the createdDateTime value is returned as null. I suppose the issue is that the value is retrievable by the back-end query when the Azure AD 'id' property is used while the userPrincipalName (which is a mutable/changeable property) is not. Bizarre but at least there seems to be an answer. Hope this helps.

Related

Graph Bookings API - List appointment returning empty customers array

When invoking either
GET /solutions/bookingBusinesses/{id}/calendarView
or
GET /solutions/bookingBusinesses/{id}/appointments
the returned bookingAppointment object has an empty customer array. However the customers appear in the UI. Any idea why this may be the case?
Looks like a bug in Graph API.
According to the documentation the customers property is optional. Sometimes you have to specify optional property in $select statement.
GET solutions/bookingBusinesses/{id}/calendarView?start=2018-04-30T00:00:00Z&end=2018-05-10T00:00:00Z&$select=customers
Another option is trying beta version instead of v1.0
GET beta/solutions/bookingBusinesses/{id}/calendarView?start=2018-04-30T00:00:00Z&end=2018-05-10T00:00:00Z

Does Microsoft Graph have lastModifiedDateTime to detect latest entity changes?

Some of the Graph API return a lot of data and require paging. Exists a lastModifiedDateTime property to get only changed rows, such as to make this call that returns users who are modified since a given date?
https://graph.microsoft.com/beta/users?$filter=lastModifiedDateTime gt '2020-01-01T12:00:00Z'
or get the classes that have changed (Educational API)
https://graph.microsoft.com/beta/education/classes?$filter=lastModifiedDateTime gt '2020-01-01T12:00:00Z'
The Property you are trying i.e., 'lastModifiedDateTime' is not part of the MS Graph.
In Ms Graph this is possible with directoryAudits method which contains all information related to changes(logs) in Azure AD.
To Get the last activity in azure you need to use 'activityDateTime' property and to get the user information 'initiatedBy' property.

Fields return null in Graph API Query

Querying the graph API returns null for many fields which should not be null, for example jobTitle, userType, createdDateTime, and isAccountEnabled. Why are these fields showing up as null? Is there something that needs to be enabled from the global Azure AD?
How can I get these fields to return with their proper values rather than null?
You need the permission "Directory.Read.All" at least.
So that you can read user data in your organization's directory. Otherwise, you will get "null" value.
Microsoft Graph permissions reference - Directory permissions

Missing property in resourceVisualization in Trending endpoint

The documentation for resourceVisualization resource type (Trending endpoint) says that one of the properties that gets returned as part of the object is type.
However, when I use Graph Explorer to test the endpoint I don't see this property. Is it going to be added soon?
We have that identified and we are working on updating the API schema to have that property available by the end of next week.
Mario

Desire2Learn Put GradeObject Shortname Bug?

I believe that the put GradeObject Put api call has a bug when trying to update the ShortName field.
I believe that the ShortName is not being updated (other fields appear updated correctly). The Post new grade object works as expected.
I am receiving a 200 result, and fields are updated as expected, however, the ShortName is not being updated.
The response I receive contains the correct ShortName (ie the one that I passed and would expect D2L to change to), but it's not updated on D2L.
We use the same Grade object to Add (Post) as we do to (Push), so we are interested in your thoughts.
I can confirm that I am using the same spelling and case as documented here: http://docs.valence.desire2learn.com/res/grade.html
I can also confirm that the SAME OBJECT works correctly when 'posting' the object, only put fails to update that field, and it's only that field that doesn't get updated.
Is this a D2L Bug?
Can somebody from D2L or otherwise confirm that updating the Shortname works as expected?
This is a known issue with the Valence Learning Framework API's GradeObject update APIs. It has not yet been addressed.
Currently, there is no way through the APIs to set or update the ShortName property of a grade object.

Resources