azureazure-data-factoryxero-api

Update a Secret in Azure Vault via Azure Data Factory Pipeline


I have been following the steps outlined here and here to connect Xero to Azure Data Factory. I am unable to update the refresh token and the access token in my vault.

I have set up my web activity as it appears in the image below

ADF Web activity settings

And here is the body:

{“value”:”@{activity('GetBearerToken').output.access_token}”}

However, the activity is failing with the following message:

Error details Save New Xero Access Token Error code

2108

Failure type User configuration issue Details {"error":{"code":"MethodNotAllowed","message":"HTTP POST not allowed"}} Activity ID xxxxxxxxxxxxxxxxxxxxxxxxxxxx


Solution

  • To Update a Secret in Azure Vault via Azure Data Factory Pipeline use Put method.

    URL - https://myvault.vault.azure.net//secrets/crpsecret?api-version=7.4
    Method - PUT
    Body - @concat('{"value":"',variables('var2'),'"}')
    **@concat('{"value":"',activity('GetBearerToken').output.access_token,'"}')**In your case
    Authentication - System Assigned Managed Identity
    Resource - https://vault.azure.net
    

    enter image description here

    Make sure your ADF managed identity have set permissions on secret.

    enter image description here