> For the complete documentation index, see [llms.txt](https://docs.geoprismregistry.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.geoprismregistry.com/readme/current-1/deployment-and-setup/3.9-dhis2-oauth-integration/3.9-dhis2-oauth-integration.md).

# 3.9.1. Configuring DHIS2

DHIS2 must be configured to allow GeoPrism Registry to connect to it. This is accomplished using DHIS2’s 'OAuth2 Clients' configuration. This can be found in the DHIS2 'System Settings' app.\
\
Clicking the blue **+** button on the right allows us to create a new OAuth client.

<figure><img src="/files/Vizxph0cJ6ga5svunyJn" alt=""><figcaption></figcaption></figure>

To configure the OAuth client, fill in the following:

* Name: *georegistry*
* Client ID: *georegistry*
* Client Secret: \<already pre-filled>
* Grant Types:
  * Password: *unchecked*
  * Refresh token: *unchecked*
  * Authorization code: *checked*
* Redirect URIS (if your GeoPrism Registry instance is not using HTTPS, you should use HTTP here instead):
  * *If your CGR server is of version 1.0, this URL looks like:*

    *https\://\<GeoPrism Registry instance URL>/cgrsession/ologin*
  * If your CGR server is of version 1.1, this URL looks like:\
    \&#xNAN;*https\://\<GeoPrism Registry instance URL>/api/cgrsession/ologin*
  * If your CGR server is of version 1.2+, this URL looks like:\
    \&#xNAN;*https\://\<GeoPrism Registry instance URL>/api/session/ologin*

<figure><img src="/files/EyhYzEXnToRyW7y5eKhm" alt=""><figcaption></figcaption></figure>

Take note of the Client Secret which is generated here. We will need it when configuring GeoPrism Registry External Systems with OAuth.

Click save to create the new OAuth2 client in DHIS2.

{% hint style="info" %}
See the [section 4.2.1](/readme/current/external-system-integration/4.2-register-and-synchronize-an-external-system/4.2.1-dhis2.md) on how to use the DHIS2 OAuth configuration in an external system registration.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.geoprismregistry.com/readme/current-1/deployment-and-setup/3.9-dhis2-oauth-integration/3.9-dhis2-oauth-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
