Forum Discussion

jsilva24's avatar
jsilva24
Frequent Visitor
5 years ago

Power BI Embedded AI functions with Service Principal

Hi,

We currently are attempting to use The AI functions in a report that will live in our A2 Premium Capacity workspace. With the Power BI Rest API, I was able to successfully populate the AI Functions Datasource with an access token that belonged to my personal account, refresh the dataset, and see the AI values for Sentiment Analysis.

 

However, our approach is an app owns data approach, which utilizes the Service Principal account. We would like to use the Service Principal account instead of a User account. I attempted to similarly populate the AI Functions Datasource with the same access token that the service principle uses to access the Power BI Rest API. The update was successful, and the refresh also 'completes' however when I try to create a report, the AI values for Sentiment Analysis are empty.

 

So is it possible to use a Service Principal account that, similar to my user account, is an admin in the capacity and workspace to use as the requirement for the AI Functions Datasource?

 

If so, does the access token need to be retrieved in a particular way?

 

More Details:

1. The access token that was successfully used with my User account was picked up from fiddler while observing the https/http traffic when power bi desktop is connecting and refreshing the dataset locally.

2. The access token used in our app owns data uses the recommended sdk which uses POST https://login.windows.net/{tenantId}/oauth2/token

 

Thank You!

2 Replies

    • jsilva24's avatar
      jsilva24
      Frequent Visitor

      Hi Anonymous 

      Thank you for the response. I did not find that any limitations are met as none of them mention anything AI related.