> ## Documentation Index
> Fetch the complete documentation index at: https://base-a060aa97-docs-sync-code-change-3820cf0.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 given policy ID, with defined behavior 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.

**Malformed ID** — The invert flag (bit 63) is cleared before the type check. If the remaining top byte is outside the valid `PolicyType` range, the ID is malformed and the function returns `false`.

**Unknown ID (well-formed, not registered)** — Treated as an empty member set:

| Policy type | Result |
| - | - |
| `ALLOWLIST` | `false` |
| `UNION` | `false` |
| `BLOCKLIST` | `true` |
| `INTERSECT` | `true` |

**Invert** — `isAuthorized(invertedPolicyId(id), account)` returns the negated result of the base policy when that base exists. Applies to every policy type. An inverted unknown or malformed base returns `false`.

<Note>
  Callers that store policy IDs MUST validate `policyExists(policyId)` at write time.
</Note>

## Parameters

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

## Returns

`bool` — `true` if `account` is authorized under `policyId`, `false` otherwise.

## Access Control

Read-only view function; no role restriction.

## 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);
```
