# AWS ALB 561 Unauthorized (identity provider error)

**Code:** `561` · **Category:** HTTP · **Seen on:** AWS, HTTP

An ALB authenticate action got an error from the identity provider (IdP) while authenticating the user.

## Meaning

Check the IdP configuration (client ID/secret, token endpoint, redirect URI), IdP availability and the ALB authenticate rule. The ALB logs the exact IdP error in the `error_reason` access-log field.

## Common causes

- Wrong client ID/secret in the ALB rule
- IdP token endpoint unreachable
- Redirect/callback URI mismatch
- Expired IdP credentials
- Scope/claims rejected by the IdP

## Quick fix

1. Read `error_reason` in the ALB access log
2. Correct client ID/secret and callback URL
3. Confirm the IdP endpoint is reachable from the VPC

## Detailed fix by platform

### AWS CLI

1. `aws elbv2 describe-rules --listener-arn LISTENER_ARN --query "Rules[].Actions[?Type=='authenticate-oidc']"`

## How to diagnose

1. **error_reason** — Which?
2. **Client secret** — Valid?
3. **IdP** — Reachable?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/http/561-alb-unauthorized-idp-error)
