Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jsilva24
Frequent Visitor

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 2
v-yiruan-msft
Community Support
Community Support

Hi @jsilva24 ,

Please check whether it hit any following limitations when embed with Service Principal:

Considerations and limitations

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yiruan-msft 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.