This application synchronizes driver addresses from ADP Workforce Now to the Mike Albert Fleet Solutions API.
- Go 1.25.0+ installed (download)
- ADP API credentials and SSL certificate
- Mike Albert API credentials
You will need to have an ADP account with access to the Workforce Now APIs.
- Client ID - OAuth2 client ID from ADP Developer Portal
- Client Secret - OAuth2 client secret from ADP Developer Portal
- SSL Certificate (
.crtfile) - Client certificate for mTLS authentication - Private Key (
.pemor.keyfile) - Private key matching the certificate
⚠️ Important: ADP requires mutual TLS (mTLS) authentication. You must have both the certificate and private key files. These are typically provided when you register your application with ADP.
- Access to Workforce Now APIs (
/hr/v2/workers) - OAuth2 client credentials for API authentication
- Permission to read employee information and addresses
The application extracts the following information from ADP Workforce Now:
- Employee Number (from
workerID.idValue) - First Name and Last Name (from
person.legalName) - Home Address (from
person.legalAddress)
Create a configuration file named adp-driver-sync.yaml with the following structure:
adp:
clientid: "your-adp-client-id"
clientsecret: "your-adp-client-secret"
baseurl: "https://api.adp.com"
certfile: "path/to/your/certificate.crt"
keyfile: "path/to/your/privatekey.pem"
mikealbert:
clientid: "your-mike-albert-client-id"
clientsecret: "your-mike-albert-client-secret"
endpoint: "https://your-mikealbert-endpoint.com/api/v1"| Field | Description |
|---|---|
adp.clientid |
OAuth2 Client ID from ADP Developer Portal |
adp.clientsecret |
OAuth2 Client Secret from ADP Developer Portal |
adp.baseurl |
ADP API base URL (typically https://api.adp.com) |
adp.certfile |
Path to your ADP SSL certificate file (.crt) |
adp.keyfile |
Path to your private key file (.pem or .key) |
mikealbert.clientid |
Client ID provided by Mike Albert |
mikealbert.clientsecret |
Client Secret provided by Mike Albert |
mikealbert.endpoint |
Mike Albert API endpoint URL |
git clone https://github.com/MikeAlbertFleetSolutions/adp-driver-sync.git
cd adp-driver-syncCopy your ADP certificate and private key files to the project directory (or update the paths in your config):
adp-driver-sync/
├── adpCert.crt # Your ADP certificate
├── adpKey.pem # Your private key
└── adp-driver-sync.yaml
Edit adp-driver-sync.yaml with your credentials (see Configuration section above).
go build -o adp-driver-sync.exe ./cmd/adp-driver-syncOr on Linux/Mac:
go build -o adp-driver-sync ./cmd/adp-driver-sync./adp-driver-sync -config adp-driver-sync.yamlOn Windows:
.\adp-driver-sync.exe -config adp-driver-sync.yamlThis application can be run as a cron job (Linux/Mac) or scheduled task (Windows) to periodically sync driver information.
# Run daily at 2 AM
0 2 * * * /path/to/adp-driver-sync -config /path/to/adp-driver-sync.yamlCreate a scheduled task that runs:
adp-driver-sync.exe -config adp-driver-sync.yaml
- Authentication: OAuth2 Client Credentials Grant with mTLS
- Token Endpoint:
POST /auth/oauth/v2/token - Workers Endpoint:
GET /hr/v2/workers - Data Format: JSON
- Authentication: Client credentials (client_id + client_secret)
- Token Endpoint:
POST {endpoint}/token - Find Drivers:
POST {endpoint}/driver-management/driver/find - Update Driver:
POST {endpoint}/driver-management/driver/{id}
You need both the certificate (.crt) AND the private key (.pem) files. Make sure:
- Both files exist at the paths specified in your config
- The private key matches the certificate (they must be from the same key pair)
The certificate and private key files are not from the same pair. Contact your ADP administrator to get the matching files.
- Verify your Mike Albert credentials are correct
- Check that the endpoint URL is correct for your environment
- Ensure the config uses
clientidandclientsecret(no underscores)
If you see "no such host" errors, you may need to be connected to a VPN or corporate network to reach internal endpoints.
set GOOS=linux
set GOARCH=amd64
go build -o target/adp-driver-sync ./cmd/adp-driver-syncgo fmt ./...
go vet ./...