> ## Documentation Index
> Fetch the complete documentation index at: https://base-a060aa97-docs-kb-gaps-devrel-817-fees-gas-paymasters.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# IPolicyRegistry.isAuthorized

> Returns whether an account is authorized under a policy ID, including results for malformed, unknown, and inverted IDs.

## Signature

```solidity IPolicyRegistry.sol theme={null}
function isAuthorized(uint64 policyId, address account) external view returns (bool);
```

| Field | Value |
| - | - |
| Selector | `0x55a1179e` |
| Canonical signature | `isAuthorized(uint64,address)` |

## Description

Returns whether `account` is authorized under `policyId`. Never reverts.

## Result by policy ID

| Policy ID | Result |
| - | - |
| Malformed | `false`. The invert flag (bit 63) is cleared before the type check, so an ID is malformed when the remaining top byte is outside `PolicyType`. |
| Well-formed but unknown, ALLOWLIST or UNION | `false`. An unknown ID is treated as an empty set. |
| Well-formed but unknown, BLOCKLIST or INTERSECT | `true`. An unknown ID is treated as an empty set. |
| Inverted, base exists | The negated result of the base. Applies to every policy type. |
| Inverted, base unknown or malformed | `false` |

<Warning>
  Callers that store policy IDs MUST validate `policyExists(policyId)` at write time. An unknown `BLOCKLIST` or `INTERSECT` ID returns `true`, and an inverted unknown or malformed base returns `false` rather than the negation of the empty-set result.
</Warning>

## Parameters

| Name | Type | Description |
| - | - | - |
| `policyId` | `uint64` | Policy to query. |
| `account` | `address` | Account to check. |

## Returns

| Type | Description |
| - | - |
| `bool` | Whether `account` is authorized under `policyId`. |

## Access Control

Read-only. No role required.

## Policy Interaction

This is part of the singleton PolicyRegistry surface used by B20 policy scopes.

## Example

```solidity Usage Example theme={null}
bool ok = StdPrecompiles.POLICY_REGISTRY.isAuthorized(policyId, account);
```
