I'm creating new azure devops web extension, I've created new service connection of generic type (provided username and password). Need to access username and password and make rest api call inside java script file of azure devops web extension. How to form authorization header without user interaction?
Asked
Active
Viewed 394 times
0
-
Hi Sathyanarayanan Raghunathan, It's not support at the moment. Do you have any other concern. If not, appreciate for [marking it as an answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) which will also helps others in the community. – PatrickLu-MSFT Apr 24 '20 at 09:35
1 Answers
0
This is not available for any customized extension so far. Same as a customized task or script.
Because a Service Connection involves data shaped specifically to the connected service (the Generic Service Connection being the exception that proves the rule...), you won't be able to make use of strongly typed properties in your Bash task. Instead, you may want to examine environment variables and process the service connection data manually.
More detail info you could kindly take a look at Josh E's reply in this question: How can a script access Service Connections? (Azure Devops Pipelines)

PatrickLu-MSFT
- 49,478
- 5
- 35
- 62