# Add MSAL to the build

Go to Azure Pipelines and go to the UI and add a new Variables:

| **Name**                             | Value                                                                                                                   |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| REACT\_APP\_FUNCTION\_ENDPOINT       | <p>\<FRONT DOOR URL> <br>(e.g.: [https://sharethrift\&#x3C;>.azurefd.net](https://sharethrift\&#x3C;>.azurefd.net))</p> |
| REACT\_APP\_AAD\_APP\_CLIENTID       | <\<YOUR  AAD APP UI CLIENT ID>>                                                                                         |
| REACT\_APP\_AAD\_DIRECTORY\_TENANTID | <\<YOUR AAD TENANT ID>>                                                                                                 |
| REACT\_APP\_AAD\_REDIRECT\_URI       | (YOUR CDN URL:) <https://sharetrift><\<randomnumber>>.azureedge.net                                                     |
| REACT\_APP\_AAD\_SCOPES              | api://sharethrift<>.com/access\_as\_user                                                                                |

Add these variable to the YML file

{% code title="/azure-quickstart/ui/azure-pipelines.yml" %}

```yaml
- script: |
    npm install
    npm run build
  displayName: 'npm install and build'
  workingDirectory: ui
  env:
    INLINE_RUNTIME_CHUNK: false 
    REACT_APP_FUNCTION_ENDPOINT: $(REACT_APP_FUNCTION_ENDPOINT) #ADD THIS AND THE LINES BELOW
    REACT_APP_AAD_APP_CLIENTID: $(REACT_APP_AAD_APP_CLIENTID) 
    REACT_APP_AAD_DIRECTORY_TENANTID: $(REACT_APP_AAD_DIRECTORY_TENANTID)
    REACT_APP_AAD_REDIRECT_URI: $(REACT_APP_AAD_REDIRECT_URI)
    REACT_APP_AAD_SCOPES: $(REACT_APP_AAD_SCOPES)
```

{% endcode %}


---

# Agent Instructions: 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:

```
GET https://ecfmg.gitbook.io/azure-serverless-quickstart/application-design/adding-authentication/add-msal-to-the-build.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
