Hi Jagmohan Singh Salaria,
Welcome to the Microsoft Q&A.
Thanks for your question. Since you're hosting the Azure Function on Linux, you’re right that AdomdConnection won’t work—it’s Windows-only. A good workaround is to use XMLA over HTTP, which lets you query Azure Analysis Services from any platform.
Here’s how you can do it:
- Use MSAL to authenticate with Azure AD and get a bearer token for your service principal.
- Build your XMLA payload with a valid DAX query. For example:
<Execute xmlns="urn:schemas-microsoft-com:xml-analysis"> <Command> <Statement> EVALUATE SELECTCOLUMNS ( FILTER ( student, student[id] = 5 ), "name", student[name] ) </Statement> </Command> <Properties> <PropertyList> <Catalog>abc</Catalog> <Format>Tabular</Format> </PropertyList> </Properties> </Execute> - Send this payload to the AAS endpoint using HttpClient. Make sure you include the bearer token in the Authorization header and set the content type to
text/xml. - Also double-check that:
- Your service principal has access to the AAS model.
- The catalog name matches your database.
- The endpoint URL is correct (should look like
https://<region>.asazure.windows.net/<server>/webapi/xmla).