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
rayd_250592
Regular Visitor

Push API Token Xamarin Forms

Hi, 

 

I'm currently following example (https://docs.microsoft.com/en-us/power-bi/developer/automation/walkthrough-push-data-get-token) in order to try and get a token to authenticate against the PUSH API with the end goal of pushing data from a Xamarin Forms app.

 

However, following the instrictions,  Microsoft.IdentityModel.Clients.ActiveDirectory -Version 2.21.301221612 isn't available on Nuget (the closest is 2.22.30211727). Installing that, I get an error on line 

 

 

 authContext.AcquireTokenAsync(resourceUri, clientID, new Uri(redirectUri)).Result.AccessToken;

 

 

 

The error "Cannot convert from 'System.Uri' to 'Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential" occurs at
 

 

 

new Uri(redirectUri)).

 

 

 

Is the example up to date - the latest Microsoft.IdentityModel.Clients.ActiveDirectory package version is 5.2.7.

 

Any guidance would be appreciated! 

 

Thank you!

0 REPLIES 0

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.