PowerBI API works well when i use the bearer token issued from doc.micosoft.com(Try it) in Azure data factory, but it expires after a while so i have to change the bearer token again to run the pipeline.
]2

However, when i am generate the bearer token from Azure Data Factory and use it for PowerBI API permission, it fails with an unauthorized error message.
Following are the steps which I used in Azure data factory to create bearer token :-
1) App Registration of PowerBI in AAD with secret
2) Create a pipeline and bring in the Web activity to get a token.
a. Use the URL https://login.microsoftonline.com/\<Tenant ID>/oauth2/token
b. POST method
c. Add a new Header with the name of Content-Type and Value of application/x-www-form-urlencoded
d. In body added :-
tenant=tenantid&client_id="client or Application ID from App registration"&client_secret="client Secret from App registration"&grant_type=client_credentials&scope=https://analysis.windows.net/powerbi/api/.default

i am able to successfully construct the bearer token by following steps 2 .
3) Assign access token to a variable.
4) And on second web activity we are using the bearer token for authorization of PowerBI API.
a. Use the URL https://api.powerbi.com/v1.0/myorg/groups/\<groupid>/datasets/<datasetid>/refreshSchedule
b. GET Method
c. Add a new Header with the name of Authorization and Value of @markus.bohland@hotmail.de ('Bearer ',variables('token')).

The bearer token was not authorized on the second web activity.
if there is a step that i am missing or if there is another way to successfully authorize the PowerBI API token called form ADF?