> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Self Connected Apps

> Get the current Member's Connected Apps using the Stytch Next.js SDK

`self.getConnectedApps` wraps the [get member connected apps](https://stytch.com/docs/api-reference/b2b/api/connected-apps/consent-management/get-connected-apps-member.md) endpoint. Use it to get all Connected Apps for the currently logged-in Member (Represents an individual end user's account within a given Organization, uniquely identified within that Organization by their email address.).

> [!NOTE]
>
> **RBAC Enforced Method**
>
> This method requires a valid Session for a member with permission to perform the **get.connected-apps Action** on the **stytch.self Resource**.
>
> Before using this method, enable **Member actions & organization modifications** in the [Frontend SDK page](https://stytch.com/dashboard/sdk-configuration). To learn more, see our [RBAC guide](https://stytch.com/docs/multi-tenant-auth/enterprise-ready/rbac/create-rbac-policy.md).

This method retrieves a list of Connected Apps that the Member has completed an authorization flow with successfully. If the Member revokes a Connected App's access (e.g. via the [`revokeConnectedApp`](./revoke-self-connected-app) method) then the Connected App will no longer be returned in this endpoint's response. A Connected App's access may be revoked if the Organization's allowed Connected App policy changes.

To get Connected Apps for a Member other than the currently logged-in Member, use the [get member connected apps](https://stytch.com/docs/api-reference/b2b/frontend-sdks/nextjs/methods/members/get-member-connected-apps.md) method.

## Response

**connected\_apps** `object[]`

An array of Connected Apps with which the Member has successfully completed an authorization flow.

**connected\_apps properties**

**connected\_app\_id** `string`

The ID of the Connected App.

**name** `string`

The name of the Connected App.

**description** `string`

A description of the Connected App.

**client\_type** `string`

The type of Connected App. Supported values are `first_party`, `first_party_public`, `third_party`, and `third_party_public`.

**logo\_url** `string`

The logo URL of the Connected App, if any.

**scopes\_granted** `string[]`

The scopes granted to the Connected App at the completion of the last authorization flow.

**request\_id** `string`

Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
may ask for this value to help identify a specific API call when helping you debug an issue.

**status\_code** `number`

The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.

```jsx theme={null}
import { useState } from 'react';
import { useStytchB2BClient } from '@stytch/nextjs/b2b';

export const GetSelfConnectedApps = () => {
  const stytch = useStytchB2BClient();
  const [connectedApps, setConnectedApps] = useState([]);

  const handleGet = async () => {
    const response = await stytch.self.getConnectedApps();
    setConnectedApps(response.connected_apps);
  };

  return (
    <div>
      <button onClick={handleGet}>Get Connected Apps</button>
      <div>
        {connectedApps.map((app, index) => (
          <div key={index}>
            <p>App: {app.connected_app_id}</p>
            <p>Status: {app.status}</p>
          </div>
        ))}
      </div>
    </div>
  );
};
```

```json theme={null}
{
  "status_code": 200,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "connected_apps": [
    {
      "client_type": "first_party",
      "connected_app_id": "connected-app-test-aeadeabc-a3a3-4796-83d0-b757e3001000",
      "description": "A first party connected app",
      "logo_url": null,
      "name": "first-party-confidential-app",
      "scopes_granted": "openid profile email"
    }
  ]
}
```
