Hi community,
I need help because I can't find the solution.
I've created a complete Dashboard to retrieve information from the Web (MS Website) and also data from Intune via an application registered on my tenant (parameters used = Tenant ID, Apps ID and Secret ID).
In Power BI Desktop, everything works perfectly, but once published in Power BI Service, things get complicated because it's impossible to do a simple refresh.
At first there was a problem with credentials, so I went to the settings level and then Managed Connections and Gateways to play around with anonymous authentication (with or without connection verification) and also with the level of privacy. In short, nothing works.
So I started from 0 by trying to retrieve data from a Microsoft web page (see the code below). It's not very complex and it updates nicely in Power Bi Desktop.
Now, once I've published it in Power Bi Service, I can't refresh it even though it's a simple web page with anonymous access to public data.
let
// Step 1 : Get data from Microosft WbeSite
Source = Web.BrowserContents("https://learn.microsoft.com/en-us/entra/identity/users/licensing-service-plan-reference"),
// Step 2 : Extract table data from Microosft WbeSite
ExtractedTableFromHtml = Html.Table(Source, {{"Column1", "DIV.table-wrapper.has-inner-focus > TABLE.table.table-sm.margin-top-none > * > TR > :nth-child(1)"}, {"Column2", "DIV.table-wrapper.has-inner-focus > TABLE.table.table-sm.margin-top-none > * > TR > :nth-child(2)"}, {"Column3", "DIV.table-wrapper.has-inner-focus > TABLE.table.table-sm.margin-top-none > * > TR > :nth-child(3)"}, {"Column4", "DIV.table-wrapper.has-inner-focus > TABLE.table.table-sm.margin-top-none > * > TR > :nth-child(4)"}, {"Column5", "DIV.table-wrapper.has-inner-focus > TABLE.table.table-sm.margin-top-none > * > TR > :nth-child(5)"}}, [RowSelector="DIV.table-wrapper.has-inner-focus > TABLE.table.table-sm.margin-top-none > * > TR"]),
// Step 3 : Transformation operations
PromotedHeaders = Table.PromoteHeaders(ExtractedTableFromHtml, [PromoteAllScalars=true]),
ChangedType = Table.TransformColumnTypes(PromotedHeaders,{{"Product name", type text}, {"String ID", type text}, {"GUID", type text}, {"Service plans included", type text}, {"Service plans included (friendly names)", type text}}),
AddIntuneColumn = Table.AddColumn(ChangedType, "Intune Included", each
if [Service plans included] <> null
and (Text.Contains(Text.Lower([Service plans included]), "intune_b")
or Text.Contains(Text.Lower([Service plans included]), "intune_a")
or Text.Contains(Text.Lower([Service plans included]), "intune_s")
or Text.Contains(Text.Lower([Service plans included]), "intune_edu")
)
then "Yes" else null),
RenameColumns = Table.RenameColumns(AddIntuneColumn,{{"GUID", "_SkuId"}}),
FinalRows = Table.TransformColumnTypes(RenameColumns,{{"Intune Included", type text}})
in
FinalRows
In the "Managed and Connections Gateway", i checked the status and it's online.
I have this error below and i don't know how to solve it.
Thanks in advance for your help