How to fetch the status and last sync status of Enrollment Program Token?

Sharmila Chakraborty 0 Reputation points
2024-09-03T06:59:32.5966667+00:00

I am trying to fetch the status and last sync status of depOnboardingSettings but only getting the below parameters -

"value": {

"@odata.type": "#microsoft.graph.depOnboardingSetting",

"id": "40342229-2229-4034-2922-344029223440",

"appleIdentifier": "Apple Identifier value",

"tokenExpirationDateTime": "2016-12-31T23:59:54.0590989-08:00",

"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",

"lastSuccessfulSyncDateTime": "2017-01-01T00:03:28.120883-08:00",

"lastSyncTriggeredDateTime": "2017-01-01T00:00:02.0916369-08:00",

"shareTokenWithSchoolDataSyncService": true,

"lastSyncErrorCode": 1,

"tokenType": "dep",

"tokenName": "Token Name value",

"syncedDeviceCount": 1,

"dataSharingConsentGranted": true,

"roleScopeTagIds": [

  "Role Scope Tag Ids value"

]

I want to fetch the status and last sync status as well

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,876 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 41,286 Reputation points
    2024-09-03T08:45:39.18+00:00

    Hi @Sharmila Chakraborty

    In the Microsoft Graph API’s depOnboardingSettings resource, there are no parameters directly named status and lastSyncStatus. I recommend that you combine the following parameters to obtain the relevant status information.

    • lastSuccessfulSyncDateTime: The date and time of the last successful sync.
    • lastSyncTriggeredDateTime: The date and time when the last sync was triggered.
    • lastSyncErrorCode: The error code for the last sync attempt.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.