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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Boji
Regular Visitor

Failed to make a XLMA call to a PowerBI (SASS) dataset

I have the role of Fabric Adminstrator and trying to make a xlma api call through powershell. The folloing is the my scripts: 

 

Install-Module -Name SqlServer -Scope CurrentUser

$cred = Get-Credential

$XmlaCommand = @"
    <Discover xmlns='urn:schemas-microsoft-com:xml-analysis'>
        <RequestType>TMSCHEMA_PARTITIONS</RequestType>
        <Restrictions>
            <RestrictionList>
                <DatabaseName>Job Monitoring</DatabaseName>
            </RestrictionList>
        </Restrictions>
        <Properties></Properties>
    </Discover>
"@

Invoke-ASCmd -Credential $cred -Server "powerbi://api.powerbi.com/v1.0/myorg/Admin > ACE Development TEST" -Database "test" -Query $XmlaCommand

 

And I have the following error: 

Invoke-ASCmd: A connection cannot be made. Ensure that the server is running.

 

Please advice 

3 REPLIES 3
Martin_D
Super User
Super User

Hi @Boji ,

 

Did you already try URL encoding your server URL? Instead of 

"powerbi://api.powerbi.com/v1.0/myorg/Admin > ACE Development TEST"

 

try

"powerbi://api.powerbi.com/v1.0/myorg/Admin%20%3E%20ACE%20Development%20TEST"

BR

Martin

github.pnglinkedin.png

Hi Martin,

I have some additional information regarding the error. I attempted to connect to the workspace above with Tabular Editor, which is another way to test if I have access to the XMLA endpoint of the workspace. Unfortunately, I was unsuccessful. Please see the screenshot below for the error message.

In addition, I found a note in the workspace settings that reads “This workspace is configured to use a capacity you don’t have access to.” Could this be triggering the error since I don’t have access to the premium workspace? Currently, I work as a fabric administrator role in my company with premium capacity licenses. What role do I need to connect to those XMLA endpoints?

 

Screenshot 2023-10-31 3.pngScreenshot 2023-10-31 2.png

Good morning Martin: 

 

After I tried to using URL encoding I still have the same error: Invoke-ASCmd: A connection cannot be made. Ensure that the server is running.

 

From a video I watched online for XLMA on youtube My understanding is that the workspaces SASS instances act as servers the XLMA protocle tries to connect to.  Is this possible that there is something wrong with SASS instance settings? How can I check if XLMA endpoints are available in a different way? 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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