Unable to restart scim provisioning via graph api

Lawrence Wicks 0 Reputation points
2023-03-10T10:20:02.8833333+00:00

Hey there,

I have setup a logic app to restart scim provisioning in our AAD environment. I have managed to successfully get the access token, parse the JSON etc. However, when it comes to the api call to restart the job, I am getting an error. The call I am making is:

https://graph.microsoft.com/beta/servicePrincipals/{serviceprincipal}/synchronization/jobs/{jobid}/restart - with a request body of:

{

"criteria": {

"resetScope": "Watermark"

}

}

I get the error below. Any help would be appreciated.

{
  "error": {
    "code": "UnknownError",
    "message": "",
    "innerError": {
      "date": "2023-03-10T06:25:11",
      "request-id": "5455055b-6952-4597-81de-c5dd05f025fa",
      "client-request-id": "5455055b-6952-4597-81de-c5dd05f025fa"
    }
  }
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,447 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andy David - MVP 140.8K Reputation points MVP
    2023-03-10T13:00:02.26+00:00

    Does it work using powershell?

    Import-Module Microsoft.Graph.Applications
    
    $params = @{
    	Criteria = @{
    		ResetScope = "Watermark, Escrows, QuarantineState"
    	}
    }
    
    Restart-MgServicePrincipalSynchronizationJob -ServicePrincipalId $servicePrincipalId -SynchronizationJobId $synchronizationJobId -BodyParameter $params
    
    0 comments No comments