
## Set up MicroStrategy

URL: https://docs.atlan.com/apps/connectors/business-intelligence/microstrategy/how-tos/set-up-microstrategy

> Atlan supports basic authentication and API token authentication methods for fetching metadata from MicroStrategy.

Configure authentication to set up a MicroStrategy connection in Atlan. You can choose between basic authentication using a username and password, or API token authentication for enhanced security.

## Prerequisites

Before you begin, make sure you have:

* Access to your MicroStrategy Workstation
* A [MicroStrategy administrator](https://www2.microstrategy.com/producthelp/Current/Workstation/en-us/Content/workstation_create_users_and_groups.htm) to help if you don't have the required permissions yourself
* For basic authentication: The ability to create a user account with appropriate permissions
* For API token authentication: A user account with one of the following privileges:
	* `DssPrivilegesGenerateAPITokens` (299)
	* `DssPrivilegesUseUserManager`

## Configure authentication

Atlan supports two authentication methods for fetching metadata from MicroStrategy. Choose the authentication method that best fits your security requirements.

### Basic authentication

You need to create a user in your MicroStrategy Workstation and assign minimum permissions for integrating with Atlan.

To create a new user for [crawling MicroStrategy](https://docs.atlan.com/llms/connectors/microstrategy/crawl-microstrategy/llms.txt):

1. Open the [Workstation window](https://www2.microstrategy.com/producthelp/Current/Workstation/en-us/Content/navigating_Workstation.htm) with the navigation pane in smart mode.

2. From the left navigation menu, click **Users and Groups**.

3. In the upper left of the _Users and Groups_ page, click the **Select an Environment** dropdown and select your environment.

4. In the left menu of your selected environment, next to _All Users_, click the **+** button to create a new user.

5. In the _Create New User_ dialog:

	1. For _Account and Credentials_, enter the following details:
		* For _Full Name_, enter a meaningful name for the new user.
		* For _Email Address_, enter an email address for the new user.
		* (Optional) For _Description_, enter a description.
		* For _Username (Login)_, enter a username for the new user.
		* For _Password_, create a password for the new user and confirm it in the next step.
		* Check the **User can't change password** box to prevent the new user from changing their password.
		* Check the **Active User** box at the bottom left of the form.

	2. For _User Groups_, all users are automatically members of the [_Everyone_](https://www2.microstrategy.com/producthelp/Current/SystemAdmin/WebHelp/Lang_1033/Content/About_MicroStrategy_user_groups.htm) group, which typically has read permission for most objects. To assign additional permissions:
		* In the top right of _User Groups_, click **Manage User Group** to add a new user group.
		* Click **Update** to confirm your selections.

	3. To assign [user privileges](https://community.microstrategy.com/s/article/KB30634-List-of-user-privileges-their-descriptions-and-their?language=en_US), in the left menu, click **Privileges** and check the following boxes:
		* **Use Architect Editors**: For fetching attribute, fact, and table definitions
		* **Use Library Web**: For fetching project metadata
		* **Web Report SQL**: For fetching SQL statements
		* **Web use Metric Editor**: For fetching metric definitions
		* **Web run Document**: For fetching document definitions
		* **Web run Dossier**: For fetching dossier definitions

	4. Click **Save** to complete setup.

### API token authentication

API token authentication provides enhanced security by using a generated token instead of username and password credentials. Each token is valid for 30 days and only one token can be active per user at a time.

To enable API token authentication in MicroStrategy:

1. Modify the `authModes` setting to include the value `4096` in your `configOverride.properties` file within the Strategy Library application.

	Alternatively, you can add this via the `PUT /api/mstrServices/library/auth` endpoint.

2. Restart the Library Web Server to apply the changes.

3. Generate an API token:

 * Create a session from the Library to obtain the `X-MSTR-AuthToken`:
 * Use the `/api/auth/login` endpoint to retrieve this token.

 * Use the `X-MSTR-AuthToken` to call the `/api/auth/apiTokens` endpoint:
 * **For the current user**: Leave the request body blank or use an empty object `{}`.
 * **For another user**: Include the user ID in the request body.

 * The API generates a token that you can use to authenticate with Atlan.

---

## Next steps

* [Crawl MicroStrategy](https://docs.atlan.com/llms/connectors/microstrategy/crawl-microstrategy/llms.txt): Configure and run the crawler to extract metadata from MicroStrategy

---
