Service Principal object - How to return Synchronization object
I am trying to determine the amount of synchronization configured Service Principals may exist in a tenant.
When interacting with the Microsoft Graph however, I cannot filter on this nor can I seem to retrieve this data from the service principals API although the properties do exist.
example:
$sp = Get-MgServicePrincipal -ServicePrincipalID "{{insert SP GUID here}}"
# returns empty data
$sp.Synchronization
id --
$sp.Synchronization.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False MicrosoftGraphSynchronization System.Object
$sp.Synchronization | fl *
Id :
Jobs :
Secrets :
Templates :
AdditionalProperties : {}
Is there a way to filter synchronization configured service principal data from graph or is the only way to lookup all service principals and then check for a sync jobid? https://learn.microsoft.com/en-us/graph/api/synchronization-synchronization-list-jobs?view=graph-rest-1.0&tabs=http
Ultimately attempting to achieve something like below but for Entra Synchronization
Get-MgServicePrincipal -Filter "preferredSingleSignOnMode eq 'oidc'"