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.
Hi,
I have a Web API services on company server, which use Azure Active Directory for authentication.
Now I want to connect to these services from Power BI Desktop. (New source -> Web -> From Web -> Organizational account
And when I try to "Sign in", I am getting:
"invalid_resource: AADSTS50001: The application named <WEB SERVICES DOMAIN> was not found in the tenant named <MY TENANT>. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant."
Where can I set the client id? And why is the application searched the first part of the address (https://subdomain.domain.com)?
Best Regards
Hi @Mottor,
I try to connect the url which you provided, then I got a "404 Not Found" error.
"invalid_resource: AADSTS50001: The application named <WEB SERVICES DOMAIN> was not found in the tenant named <MY TENANT>. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant."
Based on my test and your error message, I think the issue may related to custom domain setting. Can you ensure you have configured correctly?
For detail information, you can refer to below article:
Configuring a custom domain name for an Azure cloud service
Regards,
Xiaoxin Sheng
Hi @v-shex-msft,
I will try to explain. I have a web service on a serve inside our company. Let say its (fictive) address is https://mycompany.com/mywebservice. Then I have registration in Azure Active Directory (portal.azure.com). From Azure I've got an Instance ('https://login.microsoftonline.com/') a Tenant (micompanygmbh.onmicrosoft.com) and a ClientId ( '12345abc-678d-9012-3456-fgh789ijkl01'), which I use (config) to connect from JavaScript, I use adal.js for authentication ( authContext = new AuthenticationContext(config);) and to get token ( authContext.acquireToken(authContext.config.clientId, function (error, token) {..});) and make request to web service. The web service use BearerTockenAuthentication.
Now, Iwant to connect to this service from Power BI Desktop? I have to send the ClientId. Without it there is no access. That means I have to change the header. What should I do (use)?
Best Regards
Hi @Mottor,
I find a sample about use power query to call the azure api(not azure ad), perhaps you can reference to below code:
let AzureMLJsonToTable = ( WebServiceURI as text, WebServiceKey as text, TableToScore as table, optional Timeout as number ) as any => let WebTimeout = if Timeout = null then #duration(0,0,0,100) else #duration(0,0,0,Timeout) , WebServiceContent = ToAzureMLJson(TableToScore),//method which used to convert the table to json //example: WebServiceURI1 = "https://europewest.services.azureml.net/workspaces/dcfeb7f96e2d431cb836299c27661e1e/services/d6291034e7c44b3ab63f0b26772a583b/execute?api-version=2.0&details=true", WebServiceKey1 = "Pxy+NXyx/YZA/YkD0OENmG4awDZGpLeHGFKKf5XgC6sKgJPPO/CUp4tin15N8aMWgpKbu41Nv9/ruWW2rIKUHA==", WebResponse = Web.Contents(WebServiceURI, [Content = Text.ToBinary(WebServiceContent), Headers = [Authorization="Bearer " & WebServiceKey, #"Content-Type"="application/json", Accept="application/json"], Timeout = WebTimeout]), output = AzureMLJsonToTable(WebResponse) // method which used to convert json to table in output in AzureMLJsonToTable
Regards,
Xiaoxin Sheng
@v-shex-msft That response does not help at all. I'm having this same problem, using PowerQuery for Excel. There's a "hidden" application involved (see here: https://stackoverflow.com/a/42513455/287610) and apparently the user needs to grant consent to that. I would like to know if there's a workaround so that Excel properly authenticates with my client ID to begin with.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |