cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
PhiBu
Helper I
Helper I

Import data using API with Access/Secret Token and Client Secret

Hey, 

I am trying to import data using the Akamai Reporting API (https://developer.akamai.com/api/core_features/reporting/v1.html). I have an account token, client token and client secret. How can I use these credentials to access the data with PowerBI? Getting the requested data works with other tools (for example postman).

So fare I have only used "Basic" and "Organizational account" for authentication.

Best regards and thanks in advance.

2 REPLIES 2
d4n
New Member

I'm also doing exploration on how to integrate the Akamai API data with Microsoft Power BI in order to create an executive dashboard.  Well, the issue I encounter right now is that the authentication to the Akamai API is realised with Akamai Edgegrid. I have multiple code example for OAuth2.0 but Edgegrid is a custom HTTP request signing protocol.

 

This specification outlines how to implement a custom HTTP request signing function in your client code.

Authenticate with EdgeGrid (akamai.com)

Example HTTP authorization header:

Authorization:EG1-HMAC-SHA256 client_token=akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx;
access_token=akaa-xxxxxxxxxxxxxx-xxxxxxxxxxxxxx;timestamp=20130817T02:49:13+0000;
nonce=dd9957e2-4fe5-48ca-8d32-16a772ac6d8f;signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Signing algorithm moniker. This shows that the algorithm includes EdgeGrid V1, hash message authentication code, SHA–256. For example: EG1-HMAC-SHA256
  • Client token. The value of the client_token from the .edgerc file.
  • Access token. The value of the access_token from the .edgerc file.
  • Timestamp. The UTC time when the request is signed. The timestamp is in this format: yyyyMMddTHH:mm:ss+0000
  • Nonce. A nonce, or number used once, must be assigned for the request. This is a random string used to detect replayed request messages.
  • Signature. The signature is the base64-encoding of the SHA–256 HMAC of the data to sign with the signing key. The signing key is computed as the base64 encoding of the SHA–256 HMAC of the timestamp string with the client secret as the key.

    EdgeGrid authentication relies on a set of active tokens, tied to your Akamai account. First is a unique hostname that will receive your API request.  Whenever you issue an API call, you need to include the authorization in the request body, then an authentication header, based on your client secret, access token, client token, and current timestamp, is generated and sent with each request.

     

    So to integrate Akamai Edgegrid this with Power BI, one needs to create an on-premise custom data connector.  Coded in M Language with Visual Studio + Power Query SDK.  This could be done with Power Query but it is not safe and reliable because the code will reveal credential tokens.

     

    Anyone has M language examples to integrate Akamai Edgegrid ?

    Thank you

    d4n

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors