Forum Discussion

dpiret's avatar
dpiret
Helper I
4 years ago
Solved

Unauthorized (401) Embedded using the samples Node and .NET

Hi there.   When running the examples of embedded for your customers applications (both Node and .NET, I get this error (/getEmbedToken) Status: Unauthorized (401) Response: {"error":{"code":"Pow...
  • dpiret's avatar
    4 years ago

    I found the problem. In case this happens to anybody, here's the solution:

    The problem was in Step 7 - Enable workspace access that states Sign in to Power BI service > workspace you want to enable > Workspace access > Access pane, > copy the service principal to the Enter email address text box.

    Because the email of the global admin was already filled out, I overlooked the actual requirement of entering the service principal ("Enter email address" was confusing).

     

    The name of the service principal is the Display Name of the Azure AD app, as it appears in the Azure AD app's overview tab. This could also be a security group if you defined any.