Hi @Carrie
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others "I'll repost your solution in case you'd like to accept the answer.
Ask: Is there any solution for this issue?
I got error when retrieving AKV secret using parameter
."message": "ErrorCode=InvalidTemplate, ErrorMessage=The template function 'linkedService' is not defined or not valid."
Here are the steps to reproduce the issue
- I created AKV linked service, using parameter like below
- I created a rest api linked service, and try to retrieve a secret by using the AKV above , and append it to Auth headers, like below
- click test connection, I got error "message": "ErrorCode=InvalidTemplate, ErrorMessage=The template function 'linkedService' is not defined or not valid."
And I could see, I have another linked service, it is retrieving AKV secret like below. it works perfect, but got error only for the rest API, where I would need to retrieve it in Auth headers
Solution: I found somewhat the issue was because that we could not set AKV URL directly.
I have to
- set AKV URL as parameter in REST API,
- Click the AKV like below in Auth Header
- And set the AKV URL as @string(linkedService().AKVURL), like below, and it would work perfectly!
If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.
If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.
Please don’t forget to Accept Answer
and Yes
for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.