> ## 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-EntraIDHybridJoinSCP

## SYNOPSIS

Retrieves the Service Connection Point (SCP) for Entra ID Hybrid Join from Active Directory.

## SYNTAX

```powershell theme={null}
Get-EntraIDHybridJoinSCP
```

## DESCRIPTION

This function queries the Active Directory configuration naming context to retrieve
the Service Connection Point (SCP) object for device registration, which contains
Microsoft Entra ID tenant information.
If Active Directory is not accessible, it returns
an object with error information and null values for the SCP data.

## EXAMPLES

### EXAMPLE 1

```powershell theme={null}
Get-EntraIDHybridJoinSCP
```

Returns the SCP object with keywords containing AzureADName and azureADId when AD is accessible.

### EXAMPLE 2

```powershell theme={null}
$result = Get-EntraIDHybridJoinSCP
```

if (-not $result.ADAccessible) \{
    Write-Warning "Cannot access Active Directory: $(\$result.ErrorMessage)"
}

Tests if Active Directory is accessible and handles the error case.

## PARAMETERS

## INPUTS

## OUTPUTS

## NOTES

Requires access to Active Directory and the configuration naming context.
Must be run on a domain-joined computer or with appropriate AD access.

The returned object includes:

* WhenCreated: Creation date of the SCP object
* WhenChanged: Last modification date of the SCP object
* Keywords: Pipe-separated keywords containing AzureADName and azureADId
* Path: LDAP path to the SCP object
* ErrorMessage: Error details if AD is not accessible (null if successful)
* ADAccessible: Boolean indicating if AD was accessible

## RELATED LINKS
