I have defined a service connection of type Generic, called 'DowntimeApiKeyGen' in azure. The encrypted value of the apikey is saved under 'Password/Token Key'. How can i access the value of this apikey from an environment variable in a powershell-task under the agent phase?
I have tried various calls like following without success.
I think, there is something wrong with calling the variable. Does anyone have an idea, how to solve this issue?
The solution involving the addition of an API key under the 'Variables' tab, whether in pipeline variables or variable groups, is working, and I was already aware of it before posting my question. However, in this approach, it requires defining the API key separately for each scope within the project. Consequently, establishing the API key as a service connection not only saves time and effort but is particularly advantageous when it comes to editing or changing it. With this setup, modifications only need to be made in one central location, rather than in every variable saved in pipeline variables or variable groups.
In recent days, I fortunately discovered a way to do that and it is as following:
That's it!