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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Not applicable

Store client credentials securely

I am retrieving an access token by calling an API and then use this access token to obtain employee data. I'm using a blank query with the following code.



    Source  = Json.Document(Web.Contents(baseUrl,
          RelativePath = "oauth/issueToken",
          Headers = [#"Content-Type"="application/x-www-form-urlencoded"],

    token = Source[access_token],

    data= Json.Document(Web.Contents(baseUrl,
        RelativePath = "api/employees",
        Headers = [#"Authorization"="Bearer "&token]




I'm getting access token calling our own API (not using AAD). What is the best way to store these client credentials (client_id and client_secret) instead of hardcoding in the code?

Super User
Super User

Besides the great option @lbendlin mentioned, with an additional API endpoint you could also use the builtin credentials manager


Super User
Super User

store them in a text file in a sharepoint document library that only you have access to. Then retrieve that file as part of the Power Query transforms etc.

Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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