Public/Get-GCUserGeolocation.ps1

<#
.SYNOPSIS
    Retrieves the geolocation of a user for a specific client in Genesys Cloud.

.DESCRIPTION
    Queries the Genesys Cloud API to retrieve the geolocation information for a specific
    user and client combination.
    API Endpoint: GET /api/v2/users/{userId}/geolocations/{clientId}

.PARAMETER UserId
    The unique identifier of the user.

.PARAMETER ClientId
    The client identifier for the geolocation source.

.EXAMPLE
    Get-GCUserGeolocation -UserId '12345678-1234-1234-1234-123456789012' -ClientId 'client-id'
    Retrieves the geolocation for the specified user and client.

.NOTES
    Genesys Cloud API: GET /api/v2/users/{userId}/geolocations/{clientId}
#>

function Get-GCUserGeolocation {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$UserId,

        [Parameter(Mandatory = $true)]
        [string]$ClientId
    )

    $endpoint = "users/$UserId/geolocations/$ClientId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET
}