Forum Discussion

sgol's avatar
sgol
Icon for Advocate I rankAdvocate I
1 year ago
Solved

Enable Apache Airflow Ativation within Fabric

Hi,

 

We want to orchestrate our pipelines using Apache Airflow.

 

we have gone thru documentation here https://learn.microsoft.com/en-us/fabric/data-factory/apache-airflow-jobs-run-fabric-item-job and setup Fabric connections within Airflow.

we have granted consent thru OAuth 2.0 auth grant flow.

However, when the Fabric notebook is executed from within Airflow scheduler it is still complaining about User Consent not granted.

 

To be sure, I have verified "if Tenant level admin account has allowed users to consent for Apps." and they did it.

Is there something I am missing here. Appreciate any other inputs.

I know this one is still in preview. Did anyone else had a challenge while setting Airflow wihtin Fabric.

 

Thakns for help.

  • Hi  sgol,


    Thank you for reaching out to the Microsoft Fabric community forum. I appreciate nilendraFabric, for providing inputs on this issue.

     

    After thoroughly reviewing the details you provided, I have identified several alternative workarounds that may help resolve the issue. Please follow these steps:

     

    The "User Consent not granted" error in Power BI Service typically occurs due to permission or authentication issues when accessing data sources, APIs, or third-party applications. Ensure that the OAuth 2.0 authorization code grant flow is correctly configured. If not, go to the Microsoft Fabric admin portal. Navigate to Admin settings > Tenant settings. Look for User consent for third-party apps and ensure it is enabled. If changes were made, log out and log in again to Airflow.

     

    Double-check the client ID, client secret, and redirect URI settings in your Microsoft Entra ID app registration.

    Please verify that the Microsoft Entra ID (formerly Azure Active Directory) application has been granted the required API permissions, specifically Notebook.Execute.All and Notebook.Read.All. After assigning these permissions, ensure that admin consent has been granted for them.

     

    There may be region-specific issues. Please ensure that both the Fabric workspace and the data source are in compatible regions. Certain regions may not support all features.

     

     

     

    For more information kindly  refer to the below link :
    What is Apache Airflow job? - Microsoft Fabric | Microsoft Learn

     

    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

     

    Thank you.

     

     

     

     

     

6 Replies

  • Hello sgol 

     


    Please check this blog, it has lot of good information 

     

    https://www.mattiasdesmet.be/2024/11/05/orchestrate-fabric-data-workloads-with-airflow

     

    in summary:
    Ensure your Microsoft Entra ID app has:
    • Required API Permissions:
    • `Item.Execute.All` (e.g., `Notebook.Execute.All`, `Pipeline.Execute.All`)
    • `Item.Read.All`
    • `offline_access` (for refresh tokens)
    • Admin consent granted for these permissions.
    • Configuration Checks:
    • Redirect URI set to `https://login.microsoftonline.com/common/oauth2/nativeclient` for OAuth flows.
    • Client secret validity

  • v-kpoloju-msft's avatar
    v-kpoloju-msft
    Icon for Community Support rankCommunity Support

    Hi  sgol,


    Thank you for reaching out to the Microsoft Fabric community forum. I appreciate nilendraFabric, for providing inputs on this issue.

     

    After thoroughly reviewing the details you provided, I have identified several alternative workarounds that may help resolve the issue. Please follow these steps:

     

    The "User Consent not granted" error in Power BI Service typically occurs due to permission or authentication issues when accessing data sources, APIs, or third-party applications. Ensure that the OAuth 2.0 authorization code grant flow is correctly configured. If not, go to the Microsoft Fabric admin portal. Navigate to Admin settings > Tenant settings. Look for User consent for third-party apps and ensure it is enabled. If changes were made, log out and log in again to Airflow.

     

    Double-check the client ID, client secret, and redirect URI settings in your Microsoft Entra ID app registration.

    Please verify that the Microsoft Entra ID (formerly Azure Active Directory) application has been granted the required API permissions, specifically Notebook.Execute.All and Notebook.Read.All. After assigning these permissions, ensure that admin consent has been granted for them.

     

    There may be region-specific issues. Please ensure that both the Fabric workspace and the data source are in compatible regions. Certain regions may not support all features.

     

     

     

    For more information kindly  refer to the below link :
    What is Apache Airflow job? - Microsoft Fabric | Microsoft Learn

     

    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

     

    Thank you.

     

     

     

     

     

  • sgol's avatar
    sgol
    Icon for Advocate I rankAdvocate I

    I have given Notebook permissions directly to the app and it did work fine now. Thanks for help.

    • v-kpoloju-msft's avatar
      v-kpoloju-msft
      Icon for Community Support rankCommunity Support

      Hi sgol,

       

      May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

       

      Thank you.

      • v-kpoloju-msft's avatar
        v-kpoloju-msft
        Icon for Community Support rankCommunity Support

        Hi sgol,


        I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


        Thank you.