Try something like this
create a file generateToken.json { "resource":"xxxxxxxxxxxxxxxx", "client_id":"xxxxxxxxxxxxxxx" "grant_type":"xxxxxxxxxxxxxxxx" "username":"xxxxxxxxxxxxxxxxxxx" "password":"xxxxxxxxxxxxxxxxxxxx" }
In case you have concern about security of password, decode your password before you add to the generateToken.json and decode at data factory before you make rest api call to generate token using data factory decodeBase64 function.
In case, you can implement this as well:
- First, you need to store your credential in storage account.
- Use the lookup activity in data factory.
- Use the lookup activity output for your rest API call.
I hope this will help.