ES /docs

Procore refresh_token failed: invalid_grant, message: The provided authorization grant is invalid, e

Service
cupixworks-api
Occurrences
13
Status
Reported
Confidence
80%
Actionability
52%
Cluster ID
aca83980-754f-415b-8910-633d91d6b833
First Seen
2026-04-20 03:57 UTC
Last Seen
2026-08-05 01:43 UTC
Actions

Procore refresh_token failed: invalid_grant, message: The provided authorization grant is invalid, e

RCA Summary#

Procore integration(524)의 OAuth access token이 expired_at: 2026-02-17 20:58:20 UTC로, 요청 시점 기준 62일 이상 만료된 상태였다. 사용자가 POST /api/v1/reviews/2pujqr/integrations/procore/access_token을 호출하면서 IntegrationRepository#access_token이 만료 검사(expired_at < 10.minutes.since)를 통해 자동으로 refresh_token을 시도했으나, Procore OAuth 서버가 오래 만료된 refresh token에 대해 invalid_grant (401)를 반환했다. 핵심 원인은 Procore가 TOKEN_REFRESH_REQUIRED_PROVIDERS에 포함되지 않아 refresh_token_expired_at이 항상 nil로 설정되며, 이로 인해 cron job(Cupix::Cron::Integration.renew_before_expiration)의 refresh_token_due_to_expire 스코프에 걸리지 않아 사전 갱신이 이루어지지 않는 구조적 문제가 있다.

Scoring#

Confidence 80% · Actionability 52%

Confidence#

Dimension Score Detail
Evidence completeness 5/5 18 code refs, 5 log queries
Code path explicitness 3/3 18 file:line refs
Log evidence 2/3 section, query
RCA structure 3/3 3/3 sections
Revision history 0/3 0 revision(s)
Agent execution 3/3 success

Actionability#

Dimension Score Detail
Fix complexity 5/5 trivial
Affected files 1/5 14 file(s)
Single repo 1/3 2 service(s)
Immediate actions 0/3 absent
Testability 0/3 no test info
External dependency 3/3 no external deps
Data migration 3/3 no migration