How to List All Motherduck Users via API Beyond Service Principal Accounts?
Is there a way to list all Motherduck users using the API? I am only able to see /active_accounts which from my testing only displays service principal accounts. Below is my python code in case I am doing something wrong:
from dotenv import load_dotenv
import requests
import os
import pandas as pd
# --- Setup ----
load_dotenv()
TOKEN = os.getenv("MOTHERDUCK_TOKEN")
HEADERS = {
"Authorization": f"Bearer {TOKEN}",
"Accept": "application/json",
}
BASE_URL = "https://api.motherduck.com/v1"
# --- List all active accounts ----
def list_active_accounts():
url = f"{BASE_URL}/active_accounts"
response = requests.get(url, headers=HEADERS)
response.raise_for_status()
return response.json()
# Only lists service principal accounts
all_active_accounts = list_all_active_accounts()
.png)