> ## Documentation Index
> Fetch the complete documentation index at: https://ps365.clidsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get-EntraConnectSyncObjectReport

> Reports the objects of the Microsoft Entra Connect Sync connector spaces: sync rules applied, password sync status and sync or export errors.

# Get-EntraConnectSyncObjectReport

## SYNOPSIS

Reports the objects of the Microsoft Entra Connect Sync connector spaces: sync rules applied, password sync status and sync or export errors.

## SYNTAX

```powershell theme={null}
Get-EntraConnectSyncObjectReport [[-ConnectorName] <string[]>]
 [[-DistinguishedName] <string>] [[-ObjectType] <string[]>] [[-Top] <int>]
 [[-ExportPath] <string>] [-ErrorsOnly] [-IncludePasswordSync]
 [-GroupByErrorType]
```

## DESCRIPTION

Reads the connector space objects with Get-ADSyncCSObject on the Entra Connect Sync server and returns one row per
object: the sync rules applied, the password sync status when asked, the HasSyncError and HasExportError flags and the error texts.

By default every object of every Active Directory connector is returned.
Use -ErrorsOnly to keep only the objects
currently in error, on every connector: they are read with csexport.exe, which filters in the sync engine, so
the whole connector space is not listed.
The password sync status is read from the object log (Get-ADSyncCSObjectLog, one call per object, slow
on a large directory) and is collected only with -IncludePasswordSync.

With -GroupByErrorType, the function returns a summary instead: the number of objects per error type, per
connector and per error kind (Synchronization or Export).

For the health of the sync itself (service, scheduler, last runs, pending exports), use Get-EntraConnectSyncHealth.

Must be run on the Entra Connect Sync server (ADSync module) with a member of the ADSyncAdmins group.

## EXAMPLES

### EXAMPLE 1

```powershell theme={null}
Get-EntraConnectSyncObjectReport -ErrorsOnly
```

Lists every object in synchronization or export error, on all connectors (AD and Entra ID).

### EXAMPLE 2

```powershell theme={null}
Get-EntraConnectSyncObjectReport -ErrorsOnly -GroupByErrorType
```

Shows how many objects fail for each error type.

### EXAMPLE 3

```powershell theme={null}
Get-EntraConnectSyncObjectReport -DistinguishedName 'CN=John Doe,OU=Users,DC=contoso,DC=com' -IncludePasswordSync
```

Shows the rules applied to one user and its last password sync event.

### EXAMPLE 4

```powershell theme={null}
Get-EntraConnectSyncObjectReport -ErrorsOnly -ObjectType user -ExportPath 'C:\Temp\SyncErrors.csv'
```

Exports the user objects in error to a CSV file.

## PARAMETERS

### -ConnectorName

Name of one or more connectors to read.
By default, all connectors of type AD (all connectors with -ErrorsOnly or -GroupByErrorType).

```yaml theme={null}
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -DistinguishedName

Distinguished name of a single object to read.

```yaml theme={null}
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ErrorsOnly

Keeps only the objects currently in import, synchronization or export error, on every connector (AD and Entra ID)
unless -ConnectorName is set.
Read with csexport.exe (fast), except with -DistinguishedName.
Each row adds the
on-premises DN, UPN, error dates, retry count and, for a duplicate attribute, the conflicting object (ErrorDetails).

```yaml theme={null}
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ExportPath

Path of a CSV file to write the result to.
The result is still returned.

```yaml theme={null}
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 4
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -GroupByErrorType

Returns the error count per error type instead of one row per object.
Implies -ErrorsOnly.

```yaml theme={null}
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -IncludePasswordSync

Adds the last password sync status and timestamp of each object, and whether the password sync rule applies.
One log query per object: combine with -ErrorsOnly or -DistinguishedName on a large directory.

```yaml theme={null}
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ObjectType

Keeps only objects of these types, for example user, group, contact or computer.

```yaml theme={null}
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -Top

Stops after this number of returned objects.

```yaml theme={null}
Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 3
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
[about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

Requires the ADSync module, installed with Microsoft Entra Connect Sync.
Without -ErrorsOnly, the ...ErrorType columns hold the first line of the connector space error text (for
example permission-issue), the ...Error columns the full text.
With -ErrorsOnly, the ...ErrorType columns hold
the error name given by csexport (for example AttributeValueMustBeUnique) and the ...Error columns its message.

## RELATED LINKS

*Not documented.*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.