How do I know which synchronization rule I should use to kick off a provision-on-demand via the API

shrinjay mukherjee 0 Reputation points
2024-11-27T00:21:28.2666667+00:00

I would like to build an integration that can call the Provision on Demand Graph API for a given enterprise app: https://learn.microsoft.com/en-us/graph/api/synchronization-synchronizationjob-provisionondemand?view=graph-rest-1.0&tabs=http. This API endpoint requires a rule ID to be specified. The issue is, I'm not quite sure how to consistently identify the correct synchronization rule to use. Specifically:

  • Is there any possibility of an application/service principal having more than 1 synchronization job? The fact that there is a list endpoint suggests that it is possible - however in the provisioning UI I can only see one synchronization job ID.
  • For a given synchronization job, is there any possibility of there being more than 1 synchronization rule that supports on demand provisioning. I can see that some apps have a separate synchronization rule for inbound provisioning, but it seems most apps only have one rule for outbound provisioning. Is this always the case?
  • Say I don't know which synchronization job to use, I was planning to get all synchronization rules for all synchronization jobs, and find the synchronization job and rule that supports outbound provisioning via provision on demand. This only works if there is only one job and one rule that supports outbound provisioning using on-demand provisioning. Is this a feasible approach?

Any insight?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. FrankEscarosBuechsel-MSFT 905 Reputation points Microsoft Employee Moderator
    2024-12-04T19:21:34.87+00:00

    Hi @shrinjay mukherjee,

    I got an internal response from the product group for the functionality in the way you are using it.

    For a given synchronization job, is there any possibility of there being more than 1 synchronization rule that supports on demand provisioning. I can see that some apps have a separate synchronization rule for inbound provisioning, but it seems most apps only have one rule for outbound provisioning. Is this always the case?

    There is a 1:1 relationship between the synchronisation job and synchronisation rule in the scenario you are describing.

    Say I don't know which synchronization job to use, I was planning to get all synchronization rules for all synchronization jobs, and find the synchronization job and rule that supports outbound provisioning via provision on demand. This only works if there is only one job and one rule that supports outbound provisioning using on-demand provisioning. Is this a feasible approach?

    With the above confirmation that makes this a feasible approach indeed.

    Also with the given context I want to clarify on the first question and my response.

    Is there any possibility of an application/service principal having more than 1 synchronization job? The fact that there is a list endpoint suggests that it is possible - however in the provisioning UI I can only see one synchronization job ID.

    I responded earlier that in general this is possible, which is indeed the case, however in the context of your particular use case you can also assume that you have a 1:1 relationship, multiple jobs should only matter if cloud sync was involved in the process which you confirmed not to be the case for your particular scenario.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

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