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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
philerob2014
Frequent Visitor

How can I connect the Dell api to PowerBI?

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'
}

2 REPLIES 2
Anonymous
Not applicable

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

 

Using the Power BI API with PowerShell scripts - Refreshing your dataset - Data Analytics | FourMoo ...

 

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

amitchandak
Super User
Super User

@philerob2014 , see if approch in these links can help

 

https://community.powerbi.com/t5/Desktop/Connect-to-data-with-API-token/td-p/731867
https://chris.koester.io/index.php/2015/07/16/get-data-from-twitter-api-with-power-query/
https://docs.microsoft.com/en-us/rest/api/power-bi/embedtoken

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors