cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
leemex
Level: Powered On

Custom Connector: Cookies?

Hey guys

 

I've already created a custom connector and I'm getting back a session ID - so far so good. Since I need to pass this session ID into cookies, where or how can I actually do that? Looks like PowerApps can't handle this by itself.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Custom Connector: Cookies?

Hi @leemex,

Do you want to save the received Session ID into Cookies within your PowerApps app?

I agree with @timl's thought almost. If you want to save the received Session ID into Cookies within your PowerApps app, I afraid that there is no way to achieve your needs in PowerApps currently.

Currently, there is no available functions supported within Powerapps to save a Session ID (or other values) into Cookies.

As an alternative solution, you could consider take a try to call your REST API using HTTP action in MS Flow instead of PowerApps.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Custom Connector: Cookies?

Hi @leemex

There isn't any way to store data in cookies. Perhaps you could further explain what you want to accomplish so that we can come up with some alternatives?

If you want to persist the session id on the local device for use at a later point in time, you could use the SaveData/LoadData functions, as I mentioned here the other day.

https://powerusers.microsoft.com/t5/General-Discussion/Is-there-a-way-that-my-collection-is-saved-up...

 

Another alternative would be to store your session id in a separate data source (eg SharePoint list/SQL table) and to use the userid as the key value.

 

 

 

 

leemex
Level: Powered On

Re: Custom Connector: Cookies?

Hi @timl

 

Thanks for your answer.

When placing a REST call on our system, we're getting back a session ID. This session ID is valid for 30mins and is usually saved as a cookie when using the browser. In Postman this cookie is also automatically set/handled. When using flow (HTTP) you have an option explicitly for "Cookies" where you can parse the SessionID from the previous (login) call and place it as a variable for all the other calls. However, In PowerApps I can't seem to find this option nor do I know where to put it elsewhere (e.g. header, query, etc. - tried, but didn't work).

 

I hope this clarifies what I meant. I just don't know where or how to place this "cookie" variable in the request. If I can somehow receive it "within" the app, how do I pass it over to the request?

Super User
Super User

Re: Custom Connector: Cookies?

Hi @leemex

Thanks for clarifying this. I see exactly why you need to store a cookie.

Because it's not possible to store cookies, perhaps the only workaround is to call your custom connector from PowerApps via Flow. 

@CarlosFigueira knows the internals of PowerApps really well and might be able to comment more on this.

Community Support Team
Community Support Team

Re: Custom Connector: Cookies?

Hi @leemex,

Do you want to save the received Session ID into Cookies within your PowerApps app?

I agree with @timl's thought almost. If you want to save the received Session ID into Cookies within your PowerApps app, I afraid that there is no way to achieve your needs in PowerApps currently.

Currently, there is no available functions supported within Powerapps to save a Session ID (or other values) into Cookies.

As an alternative solution, you could consider take a try to call your REST API using HTTP action in MS Flow instead of PowerApps.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

leemex
Level: Powered On

Re: Custom Connector: Cookies?

Thanks for your clarification. Thats unfortunate as I think it influences the speed too.

Anyway, thanks!
leemex
Level: Powered On

Re: Custom Connector: Cookies?

Thank you 🙂

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 165 members 5,393 guests
Please welcome our newest community members: