
Dear @Yang, Yinchen,
Thank you so much for contacting Microsoft Q&A Forum.
Based on your description, itf the shiftPreferences API is consistently returning:
"createdDateTime": null,
"lastModifiedDateTime": null,
"lastModifiedBy": null
This typically indicates that the shift preference object may exists but hasn't been modified or explicitly created by a user or system yet. Also, I need more contexts of your situation so that I can assist you further:
- Could you please provide your input regarding this scenario?
- Additionally, may I ask which applications you are using it for?
- If applicable, kindly share the part of your code which released these null outputs.
Besides that, I have basic steps that you can double-check your work:
1.May I know that have you ever set your shift preferences? If not, the null values may be expected.
2.Check API permissions:
- Schedule.Read.All
- Schedule.ReadWrite.All
- Also verify that delegated or application permissions are correctly configured.
Reference: Get schedule - Microsoft Graph v1.0 | Microsoft Learn
Also, I find several articles that you can consult more about this issue:
- Get-MgUserSettingShiftPreference (Microsoft.Graph.Users) | Microsoft Learn
- user resource type - Microsoft Graph v1.0 | Microsoft Learn
- MicrosoftGraphUser.CreatedDateTime Property (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10) | Microsoft Learn
- educationClass: getRecentlyModifiedSubmissions - Microsoft Graph beta | Microsoft Learn
I hope this information can help you to clarify this issue so that you can resolve it soon.
Wish you a pleasant day!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.