@adigupt :
How are you getting authentication token 1st time ? You would be using some token endpoint to get the token .
You can call the same token endpoint everytime you want to connect to the endpoint (extension analyzer endpoint) , No need to store the token anywhere .
Again based on the limited information , you have provided in the post , this is what I can deduce .
1. Resource which you are trying to connect : https://extensionanalyzer.azure-test.net/api/extensiondeploymentsinfo?extensionName=Microsoft_Azure_DataProtection
2. Resource server : https://extensionanaluzer.azure-test.net/
3. Assuming you are using AAD as the IAM [Authorization Server] to get the token via a registered App on AAD .
4. If you are using AAD based on assumption from step 3 , you can call the AAD token endpoint for your token and get the token which you can pass as Bearer token in your API call .
AAD Token endpoint URL
https://login.microsoftonline.com/<<TenantID>>/oauth2/v2.0/token
Step 3 and 4 are based on assumption . If you can tell which Authorization server is being used I can help further or how are you getting the 1st token which is valid for 24 hours ?