---
name: bamboohr-install-auth-65d4561702a3
description: >-
  Choose and configure BambooHR OAuth 2.0 or API-key authentication without
  leaking HR credentials. Use when registering a partner integration, wiring
  token refresh, or repairing tenant authentication. Trigger with "BambooHR
  auth", "BambooHR OAuth", "BambooHR API key", or "BambooHR token refresh".
allowed-tools: Read,Glob,Grep,Write,Edit
argument-hint: "<oauth|api-key> <tenant-subdomain>"
version: 1.5.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags: [saas, hr, bamboohr, authentication, oauth]
model: inherit
effort: high
compatibility: Designed for Claude Code
---
# BambooHR Authentication Setup

## Overview

Configure the narrowest BambooHR identity that fits the integration. OAuth 2.0
is BambooHR's recommended path for partner integrations. An API key is suitable
for an internal tool or prototype when its owning user's permissions and key
lifecycle are acceptable.

## Prerequisites

- The target repository or integration path and the requested operator outcome.
- The tenant, identity, and data scope only when approved live work is in scope.
- The current evidence register plus customer-specific permissions and agreements.

## Current Contract

- Tenant API host: `https://{company-subdomain}.bamboohr.com`.
- Authorization endpoint: `https://{company-subdomain}.bamboohr.com/authorize.php`.
- Token endpoint: `POST https://{company-subdomain}.bamboohr.com/token.php?request=token`.
- API-key requests use HTTP Basic authentication with the key as username and
  `x` as password.
- BambooHR's official Python source supports OAuth, refresh, API keys, request
  IDs, retry controls, and redacted logging. As of 2026-09-11 the documented
  `bamboohr-sdk` distribution is not discoverable on public PyPI; verify the
  registry before installing or use an approved commit pin.

## Authentication

For OAuth, register an HTTPS redirect URI, generate a high-entropy `state`, bind
it to the initiating session, and reject callbacks whose state does not match.
Exchange the code server-side. Store access token, refresh token, expiry, tenant,
subject, and granted scope in an encrypted, tenant-scoped record.

For API keys, create a dedicated BambooHR user with only required field and
workflow permissions. Store the key in the deployment secret manager. Never put
it in `.env.example`, logs, shell history, test fixtures, or a client bundle.

## Instructions

1. Identify whether the integration is partner/multi-tenant or internal/single-
   tenant, and record the authentication decision.
2. Derive the tenant subdomain from the customer's BambooHR URL; do not accept a
   full arbitrary host from untrusted input.
3. For OAuth, implement authorization-code exchange, state validation, encrypted
   token persistence, rotation, and reauthorization after terminal refresh
   failure. The SDK does not persist refreshed tokens for the application.
4. For API keys, assign a dedicated owner, document field permissions, and set a
   rotation and revocation procedure before use.
5. Test with a low-sensitivity read such as company information. Capture status
   and request ID, but discard the response body from evidence.
6. Exercise invalid-state, expired-token, revoked-key, wrong-tenant, and denied-
   field cases before production approval.

## Tool Discipline

Use Read, Glob, and Grep to inspect existing configuration and secret references.
Use Write or Edit only for approved application configuration; write placeholders,
never credentials. This skill does not authorize browser consent, credential
creation, package installation, or remote secret mutation.

## Approval Boundaries

Require explicit approval before registering an OAuth app, changing redirect
URIs, creating or rotating an API key, writing a deployment secret, or testing
against a production tenant.

## Output

Return the chosen auth mode, tenant, requested permissions, callback and token-
storage design, test evidence without bodies, key/token owner, rotation plan,
and every action still awaiting approval.

## Error Handling

- OAuth callback state mismatch: reject immediately and start a fresh flow.
- `401`: refresh once when configured; otherwise treat the credential as invalid.
- `403`: inspect the BambooHR user's field permissions; do not broaden blindly.
- Refresh failure: stop bounded retries, preserve the last valid record, and
  require reauthorization.

## Examples

- "Configure OAuth for our multi-tenant HR connector" selects OAuth and designs
  tenant-isolated token persistence.
- "Use this admin's API key in production" pauses until a dedicated least-
  privilege identity and rotation owner exist.

## Resources

Read [official evidence](references/official-docs.md) before implementation.


---
Source attribution: jeremylongshore
Original project: https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/ab85a061f7bcc039dac13ee193de7a4cd4388571/plugins/saas-packs/bamboohr-pack/skills/bamboohr-install-auth/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2025 Jeremy Longshore

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: jeremylongshore
Original project: https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/ab85a061f7bcc039dac13ee193de7a4cd4388571/plugins/saas-packs/bamboohr-pack/skills/bamboohr-install-auth/SKILL.md
Attribution basis: Source repository record

Fields of work: Human Resources, Sales
Roles: Business Development, HR Analyst, HR Generalist
Specialties: API
Tools: BambooHR
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 40c52f8652bb8209c62a4c3335ab209b9a62bb59fd127cf5a668fd2148dd078a
