Use Power Query to call API that requires Auth & share excel file to non-technical colleagues

%3CLINGO-SUB%20id%3D%22lingo-sub-1855753%22%20slang%3D%22en-US%22%3EUse%20Power%20Query%20to%20call%20API%20that%20requires%20Auth%20%26amp%3B%20share%20excel%20file%20to%20non-technical%20colleagues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1855753%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20From%20Web%20to%20call%20an%20Auth-required%20API%20which%20returns%20data%20in%20JSON.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESince%20this%20API%20requires%20Auth%20(username%20and%20password)%26nbsp%3B%20to%20access%2C%20I%20set%20it%20in%20excel's%20Data%20Source%20Settings%20-%26gt%3B%20Credentials%20-%26gt%3B%20Basic%2C%20as%20taught%20in%20this%20url%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fdata-source-settings-power-query-9f24a631-f7eb-4729-88dd-6a4921380ca9%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fdata-source-settings-power-query-9f24a631-f7eb-4729-88dd-6a4921380ca9%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt's%20working%20and%20JSON%20data%20can%20be%20successfully%20retrieved%20from%20the%20API%2C%20and%20displaying%20in%20excel.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20my%20main%20difficulty%20is%20that%20I%20have%20to%20share%20this%20excel%20file%20to%20other%20non-technical%20colleagues%2C%20who%20very%20likely%20will%20find%20it%20difficult%20to%20manually%20set%20the%20auth%20as%20mentioned%20above.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20ask%20if%20there%20are%20any%20ways%20(any%20pre-setting%20I%20could%20make)%20such%20that%20when%20the%20colleagues%20receive%20this%20excel%20file%2C%20they%20won't%20have%20to%20manually%20set%20the%20Auth%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20other%20words%2C%20is%20there%20any%20way%20to%20make%20it%20more%20user-friendly%20such%20that%20when%20the%20non-technical%20staff%20opens%20that%20excel%20file%2C%20the%26nbsp%3BAuth-required%20API%20will%20be%20called%20and%20result%20can%20be%20displayed%20immediately%2C%20without%20them%20having%20to%20make%20any%20further%20setting%2Fconfiguration%3F%20Thx%20for%20your%20kind%20help!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1855753%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1855770%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20Power%20Query%20to%20call%20API%20that%20requires%20Auth%20%26amp%3B%20share%20excel%20file%20to%20non-technical%20colleague%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1855770%22%20slang%3D%22en-US%22%3EI'm%20using%20Excel2010%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1855856%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20Power%20Query%20to%20call%20API%20that%20requires%20Auth%20%26amp%3B%20share%20excel%20file%20to%20non-technical%20colleague%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1855856%22%20slang%3D%22en-US%22%3E%3CP%3EUpdate%20on%20my%20question%3A%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EI'm%20thinking%20if%20it's%20possible%20to%20create%20an%20excel%20login%20prompt%20for%20username%20and%20password%2C%20where%20username%20and%20password%20will%20then%20be%20automatically%20used%20to%20update%20credentials%20in%20power%20query%20data%20source%20setting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20this%20is%20feasible%2C%20then%20when%20those%20non-technical%20staff%20open%20the%20excel%20files%2C%20the%20login%20prompt%20will%20show%20up%20and%20the%20staff%20can%20enter%20the%20username%20and%20password%20for%20that%20API%20used%20in%20power%20query.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20ask%20if%20anybody%20can%20kindly%20explain%20if%20my%20thought%20is%20possible%3F%20Thx%20a%20lot!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I am using From Web to call an Auth-required API which returns data in JSON.

 

Since this API requires Auth (username and password)  to access, I set it in excel's Data Source Settings -> Credentials -> Basic, as taught in this url:

https://support.microsoft.com/en-us/office/data-source-settings-power-query-9f24a631-f7eb-4729-88dd-...

 

It's working and JSON data can be successfully retrieved from the API, and displaying in excel.

 

However, my main difficulty is that I have to share this excel file to other non-technical colleagues, who very likely will find it difficult to manually set the auth as mentioned above.  

 

I would like to ask if there are any ways (any pre-setting I could make) such that when the colleagues receive this excel file, they won't have to manually set the Auth?

 

In other words, is there any way to make it more user-friendly such that when the non-technical staff opens that excel file, the Auth-required API will be called and result can be displayed immediately, without them having to make any further setting/configuration? Thx for your kind help!

 

 

2 Replies
Highlighted
Highlighted

Update on my question: 

I'm thinking if it's possible to create an excel login prompt for username and password, where username and password will then be automatically used to update credentials in power query data source setting.

 

If this is feasible, then when those non-technical staff open the excel files, the login prompt will show up and the staff can enter the username and password for that API used in power query.

 

I would like to ask if anybody can kindly explain if my thought is possible? Thx a lot!