LowCodeStacks™
Sign in

Power BI "Contact your admin to enable embed code creation": fixes

Publish to web says to contact your admin? Why Power BI blocks new embed codes, what the admin changes, and which reports can never be made public.

Power BIFix a problem9 min read

Checked against Microsoft Learn · 7 sourcesPosted by the Maker DeskHow we write guides

You open a report in the Power BI service, select File > Embed report > Publish to web (public), and instead of an embed code you get a box titled "Contact your admin to enable embed code creation". The box tells you to ask your Power BI admin for permission to create new public embed codes. Nothing is wrong with your report. A tenant setting is stopping you, and only an admin can change it. Before you ask, make sure the report really should be public, because that's what this feature does.

  • After Publish to web (public), a box appears titled Contact your admin to enable embed code creation, with an OK button.
  • Or Publish to web (public) isn't in the Embed report menu at all.
  • Or an embed code you made earlier now shows Infringed in Manage embed codes.

Microsoft Learn shows this message in a screenshot on its Publish to web page, and its text says only that you may need to contact your admin. The wording in your tenant could differ slightly from that screenshot.

Read this before you ask

Publish to web makes a report public. Per Microsoft's documentation, nobody has to sign in to view it, and that includes the detail-level data your visuals summarise: anyone can get at the underlying data in the model, even data the report doesn't display. Learn's advice is plain: don't publish confidential or proprietary information, and check your organisation's policy if you're unsure.

You might not need a public report at all. If it's for colleagues, to see inside a website or portal, Microsoft points to the secure options on the same menu:

  • Embed report > Website or portal gives a secure embed code. Viewers sign in, and report permissions and row-level security still apply. Per Learn, each viewer needs a Power BI Pro or Premium Per User (PPU) licence unless the report and its semantic model are both on a Power BI Premium capacity or a Fabric F64 or higher capacity.
  • Embed report > SharePoint Online puts the report on a SharePoint Online page, with the same permission checks.

If the audience is your own organisation, use one of these and you don't need the admin to change anything. Our Power BI licensing guide explains who needs which licence to view.

Why you see the message

Publish to web is controlled by a tenant setting, and Learn says only admins can allow new publish to web embed codes. The setting has several states, and each one looks different to you:

How the admin set Publish to webWhat you see, per Microsoft's documentation
Turned off for the whole organisationThe option isn't in the menu for anyone, and existing public reports stop working
Turned on for specific security groups, and you're not in oneThe option is visible only to people in those groups; codes you made earlier show Infringed
Turned on, but set to allow only existing embed codesYou have to contact the admin before you can create a code
Turned on for the whole organisationYou can create codes, if the report is a supported kind

Learn doesn't say which of these states shows the "Contact your admin" box. Its Publish to web page says only that if your admin hasn't allowed you to create embed codes, you may need to contact them. Whichever state your tenant is in, only an admin can change it.

One more case stops even the admin. If your organisation uses private links to block public internet access to Fabric, Learn says the Publish to web setting is greyed out in the admin portal.

From the admin prompt to a working public embed code
  1. Step 1Is the data safe for anyone on the internet? If not, use secure embed
  2. Step 2The admin allows you in the Publish to web setting
  3. Step 3The report is a supported kind
  4. Step 4Create the embed code
  5. Step 5Check its status in Manage embed codes

What your admin changes

Find the right person. Learn says users with the Fabric administrator role in Microsoft Entra ID can act as a Power BI administrator. A small organisation that signed up for Power BI on its own may not have one yet; Learn points to Microsoft's admin takeover process for that case. When you ask, send the report name, the workspace, who the public audience is, and confirmation that the data can be public.

The steps for the admin, per Microsoft's documentation:

  1. Open the tenant settings. In Fabric, that's OneLake catalog > Govern > Configurations > Tenant settings. Learn notes that OneLake catalog and Govern are rolling out by region; where they aren't available yet, use the Settings gear > Admin portal > Tenant settings.
  2. Under Export and sharing settings, find Publish to web.
  3. Turn it on, and choose who can create embed codes: the entire organisation, or specific security groups.
  4. Check Choose how embed codes work. Learn's tenant settings page says that when it's set to Allow only existing embed codes, users have to contact the admin before they can create embed codes.
  5. Select Apply. Learn says a tenant setting change can take up to 15 minutes to reach everyone.

Microsoft's own caution to admins is to think carefully about who gets this right, because a public report needs no sign-in. Its implementation planning guidance goes further: allow a dedicated, well-managed security group for public publishing, rather than adding other groups to the setting.

Admins can also review every public code in the tenant on the Embed codes page (OneLake catalog > Govern > Configurations > Embed codes), delete codes, and change a code's owner when its publisher leaves. If Publish to web is later turned off, Learn says existing codes aren't deleted, and they work again when it's turned back on.

Check the report can be published

Once the admin has allowed you, Power BI still checks you and the report. Per Microsoft's documentation, you need:

  • a Power BI licence to publish from My workspace, or Pro or PPU to publish from other workspaces;
  • edit permission on the semantic model and reshare permission on the report, as an edit member of the workspace. Our Power BI permissions cheat sheet explains those roles.

These kinds of report can't be published to the web, whatever the admin setting says:

  • reports that use row-level security (see dynamic row-level security for why that's a feature, not a fault);
  • DirectQuery reports (Learn suggests import or composite mode instead) and any live connection, including Analysis Services;
  • reports on a shared semantic model stored in another workspace, and shared or certified semantic models;
  • reports shared with you directly or through an app;
  • reports with report-level DAX measures, or with R or Python visuals;
  • single sign-on data query models, including composite models on Power BI semantic models;
  • paginated reports, mobile layouts and multiple-language reports.

Visitors also can't export data from visuals or use Q&A in a published report.

After you publish

  • One code per report. If a report already has a code, selecting Publish to web (public) again shows that code instead of making a new one.
  • Data is cached for an hour. Learn says a refresh of an import model clears the cache, but each value is cached separately, so viewers can briefly see a mix of old and new numbers. Microsoft doesn't recommend Publish to web for data that refreshes often.
  • Watch the status. In the workspace, select the Settings gear > Manage embed codes. Learn lists four statuses:
StatusWhat it means
ActiveAnyone on the internet can view and interact with the report
BlockedMicrosoft blocked it for breaching the Power BI terms of service
Not supportedThe report uses row-level security or another unsupported setup
InfringedThe code is outside the tenant policy, usually because the setting changed after the code was made
  • Keep your access. The person who created the code must keep access to the report, including the Pro or PPU licence the workspace needs, or the public report stops working.
  • Add a placeholder image. Under heavy use, Learn says viewers can be locked out for a while; a placeholder image shows instead.

Do

  • Decide whether the audience is really "anyone on the internet" before you ask the admin.
  • Use Website or portal or SharePoint Online for people inside your organisation.
  • Review your public codes in Manage embed codes and delete the ones nobody needs.

Don't

  • Don't publish a copy of a secured report without its row-level security to get around the block.
  • Don't hide confidential columns from the visuals and assume they're safe: the model's data is reachable too.

Sources

Add LowCodeStacks as a preferred source on Google

Did this fix it?

Comments

No comments yet. Share what worked for you.

Sign in to comment. Comments show under a display name you choose, never your email.