Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Does power query work with Cookies

Hello Team    Does Power Query work with cookies?   There is no information on the portal about working with cookies: https://docs.microsoft.com/en-us/power-query/handlingauthentication   I've...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Cookie is a part of the Headers. I've got this working in Postman. I have a screenshot but don't seem to have an option to upload it here. 

     

    Is there anything different, I can do with this code:

     

    let
    Cookies= Web.Contents("https://Domain/CloudAssessmentService/api/cookie", [Headers =[Authorization= "Bearer "&TokenMethod("password", "token", "code")[access_token], #"Content-Type" = "application/json"]]),

    CookiesResponse = Cookies,

    apidata = Json.Document(Web.Contents("https://domain/api/software", [Headers =[Authorization= "Bearer "&TokenMethod("password", "token", "code")[access_token], Cookie="CookiesResponse"]]))

    in

    apidata