Automate Power BI license scripts RRS feed

  • Question

  • I am looking for automating Powershell script to assign/remove Power BI licenses something like below. I am able to run the script manually by connecting to azureAD shell and login using multi factor authentication interactively(where I enter my user id and password and then 2nd step authentication). Is there any way we can connect to AzureAD non interactively at step 1?

    1) Connect-AzureAD

    2) Set-AzureADUserLicense -ObjectId <User> -AssignedLicenses $licenses 2> $null

    Note: Above is just an example.


    Friday, November 10, 2017 10:18 PM