Forum Discussion

Dragon496's avatar
Dragon496
Helper II
1 year ago
Solved

Can I create Dataflows and notebooks with other software

Hello I appreciate that this will be an usual question. Is it possible to create and manage Dataflows using software other than the browser interface? I have exactly the same question for devel...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, Dragon496 
    Thanks for reaching out to the Microsoft fabric community forum.

    We are delighted to hear about your interest in this area. Here are some viable solutions:

     

    Notebooks:
    1.You can use the REST API to create and manage Notebooks. Below is a screenshot from the relevant documentation:

    2.Here is its request interface:

     

    POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/notebooks

     

    3.For further details, please refer to:

    Items - Create Notebook - REST API (Notebook) | Microsoft Learn
    Items - REST API (Notebook) | Microsoft Learn

    Manage and execute Fabric notebooks with public APIs - Microsoft Fabric | Microsoft Learn
     

    4.Generally, using these REST APIs requires a service principal for authentication. Fortunately, a service principal can also be created and added to the workspace via command line.
     Below is a code example:

     

    # Sign in as a user who's allowed to create an app.
    Connect-MgGraph -Scopes "Application.ReadWrite.All"
    
    # Create a new Azure AD web application.
    $web = @{
        RedirectUris = "https://localhost:44322"
        HomePageUrl = "https://localhost:44322"
    }
    $params = @{
        DisplayName = "myAzureADApp"
        Web = $($web)
    }
    $app = New-MgApplication @params
    Write-Host "Client ID of new app: " $($app.AppId)
    
    # Create a service principal.
    $ServicePrincipalID=@{
      "AppId" = $($app.AppId)
      }
    $sp = New-MgServicePrincipal -BodyParameter $($ServicePrincipalId)
    Write-Host "Object ID of new service principal: " $($sp.Id)
    
    # Create a key for the service principal.
    $credential = Add-MgServicePrincipalPassword -ServicePrincipalId $($sp.Id)
    Write-Host "Credential of new service principal: " $($credential.SecretText)

     

    For further details, please refer to:

    Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Learn
    Create an Azure app identity (PowerShell) - Microsoft identity platform | Microsoft Learn
     

    Dataflows:

    The Power BI REST API currently focuses more on managing Dataflows. Below is a screenshot from the relevant documentation:

    For further details, please refer to:
    Dataflows - REST API (Power BI Power BI REST APIs) | Microsoft Learn


    I hope my response is helpful to you. It is my pleasure to assist you.Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
     

    Best Regards,

    Leroy Lu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.