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.
I'm trying to create a PowerBI Client to user with Power BI Embedded (app owns data)
I've followed the examples and looked at the sample project/configs here, but I keep getting the following error:
System.Net.WebException : The remote name could not be resolved: 'analysis.windows.net'
The authentication code is pretty much identical to the sample:
// Create a user password credentials: My AD user for Azure and Power BI var credential = new UserPasswordCredential(Username, Password); // Authenticate using created credentials // AuthorityUrl = https://login.windows.net/common/oauth2/authorize/ var authenticationContext = new AuthenticationContext(AuthorityUrl); // ResourceUrl = https://analysis.windows.net/powerbi/api (taken from examples and is also in the sample project config) // ClientId = the app ID from registering at https://dev.powerbi.com/apps var authenticationResult = await authenticationContext.AcquireTokenAsync(ResourceUrl, ClientId, credential); if (authenticationResult == null) { return View(new EmbedConfig() { ErrorMessage = "Authentication Failed." }); } var tokenCredentials = new TokenCredentials(authenticationResult.AccessToken, "Bearer"); // ApiUrl = https://api.powerbi.com using (var client = new Microsoft.PowerBI.Api.V2.PowerBIClient(new Uri(ApiUrl), tokenCredentials) { var groups = await client.Groups.GetGroupsAsync(); // errors out here }
Any ideas? Did I misconfigure something, or should it be pointing somewhere else?
Hi @IanV,
Could you please tell me if you get the answer or the solution?
Best Regards,
Dale
it could also be that the lower TLS 1.0 0r 1.1 requests are rejected or refused.
Hi @IanV,
It seems it doesn't arise from Power BI. I would suggest you check your local DNS. Please refer to exception-the-remote-name-could-not-be-resolved-aspnet-35-c?f and system-net-webexception-the-remote-name-could-not-be-resolved.
Best Regards,
Dale
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |