ambika-garg / apache-airflow-microsoft-fabric-plugin

Apache License 2.0
4 stars 3 forks source link

Invalid request. Request is malformed or invalid #7

Closed PecTheFabricator closed 2 months ago

PecTheFabricator commented 2 months ago

Hi team,

First of all, thanks for this amazing connector.

I am facing some issues trying to configure the connector. I have followed all the steps mentioned in the doc, however I am always getting this error https://login.microsoftonline.com/error?code=9002313

Obs: I have generated the access token and used it locally to run the pipeline using the API and it worked.

ambika-garg commented 2 months ago

Hey @PecTheFabricator, Could you share the link to the documentation you used? I’d like to check it out to help resolve the issue. In the meantime, could you also give this solution a try? Thanks!

PecTheFabricator commented 2 months ago

@ambika-garg I followed the steps in here The error I shared is happening after setting the configuration inside airflow and running the dag.

ambika-garg commented 2 months ago

Hi @PecTheFabricator, It looks like you might be entering the access_token in the "Password" field when setting up the connection for the dag. However, as per the documentation, you should use the refresh_token in the connection form instead, since access tokens are short-lived. Please try using the refresh_token and see if that resolves the issue.

kind regards, Ambika

PecTheFabricator commented 2 months ago

Hi @ambika-garg now it seems to be working. Probably I was copying an invalid refresh_token. Just a note, in the doc it says that the client_secret is optional, however, in my case, if I don't set it, it will not work as expected

ambika-garg commented 2 months ago

Client_secret is required in case of web apps.

PecTheFabricator commented 2 months ago

Got it. Another situation that I am facing is, the pipeline has successfully been executed, however, in airflow it still running and showing the run_status as "InProgress", however in MS Fabric I can see it as success.

ambika-garg commented 2 months ago

I think it might be due to the fact that xcoms are only updated on the start and end of the pipeline run, so there is delayed introduced in calling API.

ambika-garg commented 2 months ago

Hi @PecTheFabricator, if your issue has been resolved, please feel free to close it. Thanks!