Laravel: Illuminate\Auth\Access\AuthorizationException: This action is unauthorized.
A policy or gate denied the action for the current user, so Laravel returned HTTP 403.
This action is unauthorized.Illuminate\Auth\Access\AuthorizationException: This action is unauthorized.403 This action is unauthorized LaravelAuthorizationException This action is unauthorized403 | THIS ACTION IS UNAUTHORIZED Meaning
$this->authorize('update', $post) or can: middleware asks your policy. Check the policy method (name matches the ability), that the policy is registered (auto-discovered in recent versions), that the user is authenticated, and the policy's logic (ownership/role). Methods returning false/null deny; missing policy for a model denies by default when using authorize.
Common causes
- Policy method returns false (not owner/role)
- Policy not discovered/registered
- Guest user (null) with non-nullable policy method
- Ability name typo
- Gate defined in wrong guard
⚡ Quick fix
- Debug the policy:
Gate::inspect('update', $post)->message() - Register the policy in
AuthServiceProvider::$policiesif needed - Allow guests with
?User $usertype-hint when appropriate
Detailed fix by platform
Laravel
php artisan make:policy PostPolicy --model=Post
How to diagnose
- Policy — Method returns?
- User — Authenticated?
- Registration — Discovered?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 429 Too Many Requests (Laravel throttle) Laravel: Illuminate\Http\Exceptions\ThrottleRequestsException: Too Many Attempts. / 429 Too Many Requests
- Attempt to read property "x" on null Laravel/PHP 8: ErrorException: Attempt to read property "name" on null
- Class "App\Models\X" not found Laravel: Error: Class "App\Models\Post" not found
Most viewed in Laravel
- MassAssignmentException Laravel: Illuminate\Database\Eloquent\MassAssignmentException: Add [x] to fillable property to allow mass assignment
- The GET method is not supported for route Laravel: The GET method is not supported for route x. Supported methods: POST (MethodNotAllowedHttpException)
- Route [login] not defined Laravel: Symfony\Component\Routing\Exception\RouteNotFoundException: Route [login] not defined
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 4 Nov 2026