Power BI – Error – Contact your admin to enable embed code creation

Microsoft Power BI When a user tries to create new embed codes using the “Publish to Web” feature, he/she/them will get the error “Contact your admin to enable embed code creation”.

Cause of the error

The reason behind this issue is, Microsoft changed the default state of “Publish to web” setting in tenant admin settings. Previously it used to be “Allow existing and new codes” and now it’s “Only allow existing codes”

The fix

The fix is simple, just change the settings to “Allow existing and new codes” and users should be able to publish to web.

The security issue & fix

But wait still the security issue exists. Any user can publish to the web and the report data is exposed to any user on the Internet who has access to the report URL. So the best course of action is to enable the additional security settings, which is “Apply to” “Specific security groups”. Once enabled, only users from a specific security group will be able to create embed codes using “Publish to web”.

For more documentation on the settings, please visit Microsoft Docs