Describe the bug
All our TRE Users are unable to access the TRE home page where APi call /api/workspaces is called. They are faced with a 500 error

The user is able to access their workspace, but cannot access the TRE home page.
Initially, this presented as an expired password in application insights. Log portion below:
Traceback (most recent call last):
File "/api/services/aad_authentication.py", line 107, in __call__
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=f'{strings.ACCESS_USER_DOES_NOT_HAVE_REQUIRED_ROLE}: {self.require_one_of_roles}', headers={"WWW-Authenticate": "Bearer"})
fastapi.exceptions.HTTPException: 403: The user is missing a required role: ['TREAdmin']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/api/api/routes/workspaces.py", line 62, in retrieve_users_active_workspaces
user = await get_current_admin_user(request)
File "/api/services/aad_authentication.py", line 110, in __call__
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=f'{strings.ACCESS_USER_DOES_NOT_HAVE_REQUIRED_ROLE}: {self.require_one_of_roles}', headers={"WWW-Authenticate": "Bearer"})
fastapi.exceptions.HTTPException: 403: The user is missing a required role: ['TREAdmin']
During handling of the above exception, another exception occurred:
.....
Exception: API app registration access token cannot be retrieved. invalid_client: AADSTS7000222: The provided client secret keys for app '<API app registration ID>' are expired.
In Entra, the "sp-aztre-cicd" service principal secret had expired (not the main API app reg). This was updated and added to AZURE_CREDENTIALS. Rerunning the pipeline got past the initial step that was failing. We now saw an error related to the TEST_ACCOUNT_CIENT_ID when registering bundles. Why would this secret expire?
Login Succeeded
Using TEST_ACCOUNT_CLIENT_ID to sign in to tre CLI
ClientSecretCredential.get_token failed: Azure Active Directory error '(invalid_client) AADSTS7000222: The provided client secret keys for app '***' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 7674e1b0-c710-4be6-aad3-50d40e5d0100 Correlation ID: dbbeeb4a-3cb3-46fe-bcc6-39d4a945498e Timestamp: 2024-10-21 15:49:56Z'
Now troubleshooting in our DEV environment
Troubleshooting steps tried:
- Update the "sp-aztre-cicd" service principal secret and update AZURE_CREDENTIALS - rerun pipeline. Result: Runs past initial steps, fails at registering bundles.
- Update Automation admin secret by running
az ad sp credential reset --id "<ID>" --query 'password' --output tsv --only-show-errors and updating test_account_client_secret in GitHub secrets. (In DEV where error had not occurred, but no new errors raised when updating secret)
- API app registration secret expired error, still present. Use command similar to above to update the password and add it into KeyVault and GitHub secrets. Re run pipeline - DEV pipeline successful. Error now does not recognise secret.
Exception: API app registration access token cannot be retrieved. invalid_client: AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '<API app ID>'
This TRE was deployed on 18th October 2023, the first failure happened on 18th October 2024. The secrets do not have an expiry in KeyVault, was a limit set on creation?
Steps to reproduce
- Deploy a TRE using CICD 1 year ago
- Have many users with TRE User and Workspace Researcher roles only
- Try to access the main UI.
Azure TRE release version (e.g. v0.14.0 or main):
v0.19.1
Deployed Azure TRE components - click the (i) in the UI:
UI Version: 0.5.28
API Version: 0.18.11
Describe the bug

All our TRE Users are unable to access the TRE home page where APi call /api/workspaces is called. They are faced with a 500 error
The user is able to access their workspace, but cannot access the TRE home page.
Initially, this presented as an expired password in application insights. Log portion below:
In Entra, the "sp-aztre-cicd" service principal secret had expired (not the main API app reg). This was updated and added to AZURE_CREDENTIALS. Rerunning the pipeline got past the initial step that was failing. We now saw an error related to the TEST_ACCOUNT_CIENT_ID when registering bundles. Why would this secret expire?
Now troubleshooting in our DEV environment
Troubleshooting steps tried:
az ad sp credential reset --id "<ID>" --query 'password' --output tsv --only-show-errorsand updating test_account_client_secret in GitHub secrets. (In DEV where error had not occurred, but no new errors raised when updating secret)This TRE was deployed on 18th October 2023, the first failure happened on 18th October 2024. The secrets do not have an expiry in KeyVault, was a limit set on creation?
Steps to reproduce
Azure TRE release version (e.g. v0.14.0 or main):
v0.19.1
Deployed Azure TRE components - click the (i) in the UI:
UI Version: 0.5.28
API Version: 0.18.11