M365 Licensing Overview - mattnovitsch/M365 GitHub Wiki
Summary:
Prerequisites:
- Power Automate Premium License
- PowerBI Desktop x64 or Power BI Report Server
- Power BI Pro License (if you want to publish for others in your organization to see)
- M365Licenses.pbit
- PowerBI-AssignedLicense
- PowerBI-LicenseReport
- PowerBI-assignedPlans
References:
- Product names and service plan identifiers for licensing
- Permissions and consent in the Microsoft identity platform - Permission types
- Navigate to Power Automate
- Click on My Flows then Import.
- Click Upload.
- Navigate where you downloaded PowerBI-AssignedLicense, PowerBI-LicenseReport, and PowerBI-assignedPlans. Select one of the files then click open.
- Once the Package has uploaded you will need the review process, this is required to correct the configurations of the package. Click the Action wrench to configure each area.
- In this example our first configuration item is the option to update or create as new, this is because my lab already has the package. This will be handy if I ever need to update it and repost for everyone to use. I'm going to create as new in this example and add the tag -demo on the resource name. Yours should be just create as new or it will probably not ask you at all. I'm clicking save to proceed.
- If you do not have a Azure Log Analytics connection then click create new. If you do have one, select your existing connection and click save.
- Skip steps 8 through 10 if you already have a connection. Click New Connection in the top of the new tab.
- Type Azure Log in the top right Search box and then select Azure Log Analytics Data Collector.
- Type in your Workspace ID and Workspace Key. (You can get your keys by following these steps: [Getting Azure Log Analytics Keys] (https://github.com/mattnovitsch/M365/wiki/Getting-Azure-Log-Analytics-Keys))
- Once you save the connection Navigate back to the Flow screen and hit refresh. Select Azure Log Analytics then click Save.
- Now that the configurations are complete, you can click import. Do this for the remaining two Flows that you downloaded from Prerequisites
- One all three flows are in the system, select one.
- Click Edit in the top middle part of the screen.
- Click HTTP then click Show Advanced Options.
- Go down Tenant, Client ID, and Secret. (If you don't know this information please refer too Register a New application. If you have the information fill it out
- Save the flow and the click Test to run it. This will check if for errors and validate you connections is working.
- Select the radio button Manually then click Test.
- Click Run Flow to start the job.
- Click Done to review the run.
- Hopefully you will see "Your Flow ran successfully" at the top, if not scan the flow for any recheck marks to review.
- Repeat the steps for the other two flows.
- Navigate back to your Azure Log Analytics Workspace.
- On the settings part of the Left side menu, select Custom Logs. You should see assignplans_CL, AssignedLicense_CL, and LicenseData_CL. If you do not see them there then it would be a good time to take a coffee break or lunch break. Check back in 15 minutes to an hour.
- Select Logs on the left side menu, expand Custom Logs then double click on AssignedLicense_CL. Change the Time Range to last 7 days and click run.
- If you get a results then lets export the query for Power BI. Select the Export button then Export to Power BI(M query).
- Repeat steps 25 and 26 for assignplans_CL and LicenseData_CL.
- Open the M365Licenses.pbit.
- Cancel the api.loganalytics.io sites.
- You will get some errors about the credentials provided, that's to be expected. Just close the refresh screen for now.
- Right click on the Fields to the right and select Edit Query.
- Click on Advance Editor and Paste in the download from AssignedLicense_CL in step 25.
- Repeat step 33 for assignplans and LicenseData.
- Click Close & Apply.
- Click "Sign in as different User" for the api.loganalytics.io sites and sign in with your organizational account. Click Connect to continue.
- Pending any errors, you should start to see something like these two pages below.