# Connect to Stardog Endpoint using Stardog CLI

**URL:** <https://community.stardog.com/t/connect-to-stardog-endpoint-using-stardog-cli/5589>\
**Category:** Stardog Cloud\
**Created:** [September 17, 2026, 9:02pm UTC](https://community.stardog.com/t/connect-to-stardog-endpoint-using-stardog-cli/5589 "2026-09-17T21:02:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![123aspsa123](https://avatars.discourse-cdn.com/v4/letter/1/3d9bf3/32.png) [@123aspsa123](https://community.stardog.com/u/123aspsa123)\
**Post date:** [September 17, 2026, 9:02pm UTC](https://community.stardog.com/t/connect-to-stardog-endpoint-using-stardog-cli/5589/1 "2026-09-17T21:02:22Z")

</div>

Hi. I have a free Stardog cloud account and have difficulty connecting to the endpoint that is available to me. When I run the command below I receive an Authentication Failure error message. Since I do not have control/access to the endpoint, I do not know if authentication is based on a username & password or some other form. Currently, I am attempting to access the endpoint via my Stardog cloud account's username/password.

I put a placeholder for the server's endpoint address & user name; the password prompt appears when executing the command. The 'nw' is a reference to a Stardog database at the endpoint.

stardog --server query execute -u -P nw "SELECT \* WHERE { ?s ?p ?o } LIMIT 10"

I would appreciate your feedback on resolving the authentication failure.

---

<div class="post-metadata">

**Author:** ![Joe\_Fagan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/joe_fagan/32/1400_2.png) [@Joe\_Fagan](https://community.stardog.com/u/Joe_Fagan)\
**Post date:** [September 18, 2026, 10:02am UTC](https://community.stardog.com/t/connect-to-stardog-endpoint-using-stardog-cli/5589/2 "2026-09-18T10:02:22Z")

</div>

Hi Anthony

Although you're already signed in to Stardog Cloud in the browser, programmatic access works differently. The CLI (and PyStardog) authenticate with a username and password and they cannot reuse your browser SSO session. So create a dedicated API user on your endpoint.

**Create an API User**

1. Open **Studio IDE** and select the **Security** icon in the left sidebar.
2. Click **+** to create a new user.
3. Enter a username and password, then click **Add**.

Your new user has no permissions yet. Stardog uses a default-deny RBAC model meaning access is denied unless explicitly granted. To give your API some privileges, assign it, for example, the built-in `cloud` role.

**Assign the** `cloud` **Role**

1. In the **Users** panel, select your new user.
2. Click **Assign Role** and select **cloud**.

* * *

**Verify Access**

You should now have your endpoint URL, username, and password. To confirm connectivity, open the following URL in your browser: {ENDPOINT}/catalog

eg `https://sd-5eb9e7de.stardog.cloud:5820/catalog`\*  
\*  
(This will access the nonamed graph of the catalog database.)

Sign in with your new API credentials when prompted. A successful response returns `@prefix` lines at the top this confirms your endpoint is reachable and your credentials are valid.

Joe

---

<div class="post-metadata">

**Author:** ![123aspsa123](https://avatars.discourse-cdn.com/v4/letter/1/3d9bf3/32.png) [@123aspsa123](https://community.stardog.com/u/123aspsa123)\
**Post date:** [September 18, 2026, 12:38pm UTC](https://community.stardog.com/t/connect-to-stardog-endpoint-using-stardog-cli/5589/3 "2026-09-18T12:38:30Z")

</div>

Hi, Joe. Much appreciated. Thank you.
