Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hey Everyone,
I have used the Dell Asset API for sometime now in Powershell. But I need to move it over to PowerBI and dont know how to make the connection. Any ideas how to do this? I cant just authenication with credentials like others I have used, I have to authenicate and get a token first.
#Region - Authenitcate with API
if (!$token)
{
$AuthURI = "https://apigtwb2c.us.dell.com/auth/oauth/v2/token"
$OAuth = "$ApiKey`:$KeySecret"
$Bytes = [System.Text.Encoding]::ASCII.GetBytes($OAuth)
$EncodedOAuth = [Convert]::ToBase64String($Bytes)
$Headers = @{ }
$Headers.Add("authorization", "Basic $EncodedOAuth")
$Authbody = 'grant_type=client_credentials'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$AuthResult = Invoke-RESTMethod -Method Post -Uri $AuthURI -Body $AuthBody -Headers $Headers
$token = $AuthResult.access_token
$headers = @{ "Accept" = "application/json" }
$headers.Add("Authorization", "Bearer $token")
}
#endregion
#Get the servicetag variable ready
$ServiceTag = ($textBox.Text).Split("`n")
[string[]]$ServiceTag
##Process each servicetag in the collection and write to spreadsheet
ForEach ($thing in $ServiceTag)
{
$params = @{ }
$params = @{ servicetags = $thing; Method = "GET" }
$response = Invoke-RestMethod -Uri "https://apigtwb2c.us.dell.com/PROD/sbil/eapi/v5/asset-entitlements" -Headers $headers -Body $params -Method Get -ContentType "application/json"
$Json = $response | ConvertTo-Json
$response = $Json | ConvertFrom-Json
$model = $response.productLineDescription
$ShipDate = $response.shipDate
$Support2 = $response.entitlements
$ShipDate = $ShipDate | Get-Date -f "MM-dd-y"
$today = get-date
$type = $response.ProductID
if ($type -Like '*desktop*')
{
$type = 'desktop'
}
elseif ($type -Like '*laptop*')
{
$type = 'laptop'
}
Hi @philerob2014 ,
I did some digging and I'm sharing some links with you that list some things that might help with the problem.
Working with PowerShell in Power BI | Microsoft Power BI Blog | Microsoft Power BI
Call any Power BI REST API with PowerShell - Guy in a Cube
Hope it helps.
If this doesn't work for you, please consider sharing more details about it.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!