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
<FRONT DOOR URL> (e.g.: https://sharethrift<>.azurefd.net)
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
- 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)
Last updated
Was this helpful?