Recently while working on a Power Pages implementation for a client, I had the requirement to show the last time a user logged in on their profile page. I thought this would be easy to do as there is already a field on the contact record for "Last Successful Login" ( adx_identity_lastsuccessfullogin). This use to update when a user logged in, but it appears Microsoft has removed that automation.
While searching I came across a few different ways of achieving this task. One used application insights in Azure and another one used an HTTP endpoint setup in Power Automate. I thought, this needs to be simpler. What I came up with is to use Liquid with JavaScript to tell if a user is logged in or not. Then use the new Power Pages api to update the logged in users contact record to mark the last time they logged in.
Here is the approach I setup:
1) Make sure you turn on the api for contact in Site Settings.
1) Link to Microsoft Doc On How to turn on the api
2) Make sure you include "adx_identity_lastsuccessfullogin" in the list of fields to return.
2) I tested my process on the home page. On the home page add two JavaScript Functions. The first function (CheckIfUserJustLoggedIn) uses Liquid to tell if the user is logged in. If they are not, it deletes our value from session memory. If the user is logged in we check session memory to see if there is already a key in there with the date and time the user logged in. If there is, we don't do anything else. If there isn't then we create it and we update the contact record for the user via the Power Pages API. The second function is Microsoft's wrapper function that handles the Ajax call and handles the authentication piece to make sure the user is authorized to perform the option.
1: function CheckIfUserJustLoggedIn()
2: {
3: var sessionLastLogin = "sessionLastLogin";
4: var isLoggedIn = "{% if user %}true{% else %}false{% endif %}";
5: if (isLoggedIn == 'true')
6: {
7: var userId = "{{user.id}}";
8: userId = userId.replace('{', '').replace('}', '');
9: var lastLogin = sessionStorage.getItem(sessionLastLogin);
10: if (lastLogin == null)
11: {
12: var dateTimestamp = new Date();
13: sessionStorage.setItem(sessionLastLogin, dateTimestamp);
14: webapi.safeAjax({
15: type: "PATCH",
16: url: "/_api/contacts(" + userId + ")",
17: contentType: "application/json",
18: data: JSON.stringify({
19: "adx_identity_lastsuccessfullogin": dateTimestamp
20: }),
21: success: function (res) {
22: console.log(res);
23: }
24: });
25: }
26: }
27: else
28: {
29: sessionStorage.removeItem(sessionLastLogin);
30: }
31: }
1: (function(webapi, $){
2: function safeAjax(ajaxOptions) {
3: var deferredAjax = $.Deferred();
4: shell.getTokenDeferred().done(function (token) {
5: // add headers for AJAX
6: if (!ajaxOptions.headers) {
7: $.extend(ajaxOptions, {
8: headers: {
9: "__RequestVerificationToken": token
10: }
11: });
12: } else {
13: ajaxOptions.headers["__RequestVerificationToken"] = token;
14: }
15: $.ajax(ajaxOptions)
16: .done(function(data, textStatus, jqXHR) {
17: validateLoginSession(data, textStatus, jqXHR, deferredAjax.resolve);
18: }).fail(deferredAjax.reject); //AJAX
19: }).fail(function () {
20: deferredAjax.rejectWith(this, arguments); // on token failure pass the token AJAX and args
21: });
22: return deferredAjax.promise();
23: }
24: webapi.safeAjax = safeAjax;
25: })(window.webapi = window.webapi || {}, jQuery)
If you run into issues for permissions check your Power Pages Web Roles table and make sure the user has the correct permissions for the contact table.
The world of Chrome Hearts Matty Boy is full of color and meaning. The brand celebrates imperfection and creative expression.
ReplyDeleteUsers can search HMDD by disease name or by specific microRNA identifiers. The database interface provides an intuitive design that simplifies data exploration for both experts and students.
ReplyDeleteJapanese knives also stand out for their blade geometry. Unlike Western knives, which often feature a double-beveled edge, many traditional Japanese knives have a single-beveled edge, meaning they are sharpened on only one side. This design enables more precise cuts and is ideal for delicate slicing tasks, such as preparing sushi or sashimi. The asymmetry also contributes to the knife’s characteristic cutting feel.
ReplyDelete"The detailing on the back of the hoodie is what got me. Trapstar really puts effort into every piece they drop."
ReplyDeleteCorteiz emerged around 2017, when Clint began selling T-shirts and hoodies emblazoned with the now-iconic Alcatraz logo—a symbol representing freedom and breaking boundaries. Rather than relying on traditional retail strategies
ReplyDeleteLE LIS is a contemporary women’s fashion brand whose mission is to celebrate the vibrant spirit of today’s trendy young women. According to the brand’s “About Us” page, it seeks to empower women to express their individuality, feel confident, and turn heads with every outfit.
ReplyDeletefake gods often arose from superstition and ignorance. When natural phenomena like storms, droughts, or diseases struck, people personified them as deities to explain the unknown. Over time, some individuals manipulated these beliefs for personal gain
ReplyDeleteKurtka Trapstar to must-have tego sezonu 🔥 Widziałam już kilka influencerek, które ją noszą.
ReplyDeleteOver time, the meaning of “godspeed” has broadened beyond physical travel. It is now often used metaphorically to wish someone well as they embark on any significant undertaking—starting a new job, pursuing education, or beginning a new chapter in life.
ReplyDelete“What I love most about Asaali is that their clothes make me feel confident and classy without trying too hard. Minimal effort, maximum elegance!”
ReplyDeletefake gods have taken new forms. No longer confined to temples or shrines, they exist in the digital world, in celebrity culture, and even in corporate ideologies. Many people today unconsciously worship money, technology, or fame—believing these forces can bring ultimate happiness.
ReplyDeleteSp5der emphasises high‐quality fabrics: heavy cotton fleece blends, reinforced seams, and durability built for the urban environment.
ReplyDeleteThe Essentials hoodie has become a standout piece in Canada’s streetwear culture, representing both comfort and minimalism. Designed by Fear of God’s Jerry Lorenzo, the hoodie combines luxury aesthetics with everyday practicality, making it a staple for those who value both fashion and function.
ReplyDeleteLove how Sean John clothing celebrates individuality and confidence. You can feel the energy of hip-hop culture in every piece.
ReplyDeleteLattafa Perfumes was founded in 1982, born from a passion for creating perfumes that reflect the rich cultural heritage of Arabia.
ReplyDelete“Super cozy and the oversized fit is perfect for layering. Would love to see a zip-up version too!”
ReplyDeleteCodes expire, or may only apply to certain items (e.g., full-price items only). If a code doesn’t work, it may be expired or not eligible for the items in your cart. The example site explains this issue.
ReplyDeleteThese fabrics make the hoodie ideal for year-round wear, from chilly mornings to cozy evenings. The fabric’s breathable nature also ensures comfort during light physical activities or lounging at home. Many hoodies feature a fleece lining that adds an extra layer of warmth, especially in colder months.
ReplyDeleteFashion reps have honestly changed the game for people who love designer styles but don’t want to spend thousands. Some of the newer pieces are almost identical to retail — from the fabrics to the logos. It’s amazing how far the quality has come in just a few years.
ReplyDeleteSocial media has played a major role in the hoodie’s rise to fame. Influencers, models, and celebrities have been frequently spotted wearing Mr Winston, often styling it with other minimalist pieces or statement sneakers. The brand’s organic popularity on platforms like Instagram and TikTok has turned the hoodie into a symbol of relaxed sophistication. It’s now recognized globally, even though the brand remains deeply rooted in its Australian origins.
ReplyDeleteL’aspect environnemental occupe une place importante dans la stratégie de Davril Supply. Consciente des enjeux liés au développement durable, l’entreprise a mis en place plusieurs initiatives visant à réduire son empreinte écologique.
ReplyDeleteBluzy tej marki charakteryzują się minimalistycznym krojem i funkcjonalnymi detalami. Często posiadają charakterystyczną naszywkę z kompasem na lewym ramieniu, która stała się ikoną marki. To rozpoznawalny symbol, który jednoznacznie kojarzy się z wysoką jakością i dbałością o każdy detal.
ReplyDeleteThe price is a little steep, but you’re basically buying an art collectible you can actually wear. Totally see why people are obsessed.
ReplyDeleteThe Trapstar sweatsuit definitely has the look: clean lines, bold logo, and a design that can go from casual errands to low-key events.
ReplyDelete“Kanye’s influence on fashion never misses. The way this tee blends music culture with streetwear aesthetics is genius. Love how it represents more than just merch — it’s wearable art.”
ReplyDeleteThe Godspeed Hoodie has that perfect balance between minimalism and boldness. It’s simple but still makes you feel stylish and unique at the same time.
ReplyDeleteKapital really nailed the craftsmanship on this one. The bone detailing isn’t just printed — it’s beautifully knit into the fabric, which gives it so much depth and texture. It’s the kind of piece that feels both collectible and wearable.
ReplyDeleteThe Charles Jeffrey Loverboy tank top is seriously one of the coolest pieces I’ve picked up this season. The design is so distinctive — it’s got that punk-meets-playful vibe that makes Loverboy stand out. Definitely a conversation starter every time I wear it.
ReplyDelete“I really like how Corteiz managed to modernize the classic cargo short look. The fit is spot on — not too baggy, not too slim — and the detailing gives it that premium streetwear vibe. Worth every penny.”
ReplyDeleteWearing an Essential Hoodie feels like wrapping yourself in warmth and ease without any unnecessary weight. The cotton blend material provides a natural softness that breathes well during different seasons. It keeps you warm in the winter yet remains comfortable in spring and fall. The fit is designed to be slightly oversized which allows for layering without feeling bulky. The hood gives a sense of security and privacy when you need it. Whether you are walking through the city or sitting by a campfire the Essential Hoodie adjusts perfectly to the moment.
ReplyDeleteBig fan of the concept behind Alchemai: the brand talks about transformation, growth, making something because you want it, not because someone else already did
ReplyDeleteThe Akimbo hoodie features a bold logo on the chest. Its minimalist style makes it easy to match with any outfit. It quickly becomes a favorite in any wardrobe.
ReplyDeleteThe fabric blend used in the Chrome Heart hoodie keeps you insulated without feeling heavy. It’s perfect for late-night outings, travel, and winter casual fits. Holiday promotions make the value even better. Explore the Chrome Heart hoodie collections during Christmas before prices return to normal.
ReplyDeleteReally enjoyed this post about trending hoodies. I have seen the mr winston hoodie gaining popularity because of its minimalist streetwear vibe. Christmas deals are making it easier to try the brand for the first time. It looks great with slim jeans or oversized joggers.
ReplyDeleteKapital Clothing has become one of my go-to brands for winter wear. Their jackets and knitwear are warm, stylish, and full of personality.
ReplyDeleteCiekawy punkt o prezentach dla fanów streetwearu. Ubrania powinny budzić emocje i być praktyczne. Stone Island hoodie to prezent który robi wrażenie i przetrwa wiele sezonów. Wyprzedaże świąteczne to najlepszy moment na zakup.
ReplyDeleteTrapstar’s signature “It’s a Secret” touch always gives their clothes a mysterious edge. The brand has built such a cool identity in the urban fashion scene. You can instantly recognize a Trapstar piece from afar.
ReplyDeleteThe Christmas sale helped me save a lot on essentials hoodie collections definitely worth trying for winter comfort and style.
ReplyDeleteThe fusion of pop art and street culture in Takashi Murakami shop clothing is really impressive. Every design looks like it belongs in a museum yet is wearable for everyday outfits. A great brand to explore if you enjoy artistic streetwear.
ReplyDeleteI appreciate how long lasting the essentials hoodie is even after multiple washes it still keeps its shape and softness.
ReplyDeleteYour perfume layering tips are valuable. Lattafa perfumy are surprisingly versatile and mix well with musky or floral base notes. I love combining Lattafa Raghba with vanilla lotions for a stronger winter vibe. If anyone is planning a perfume haul check Christmas holiday sales first.
ReplyDeleteIf you are shopping for cozy and elegant clothes this holiday season Le Lis Clothing has some great options Their pieces are versatile and easy to style The Christmas sale makes the pricing even better Give them a look
ReplyDeleteThanks for sharing such insightful content. The first time I learned how to eat a dragonfruit was during a holiday event and it became my favorite snack. Removing the skin and slicing the flesh into cubes makes it ideal for festive fruit platters. If anyone is shopping this Christmas sale check the markets for dragonfruit deals because it tastes amazing and makes gifts memorable.
ReplyDeleteWhen talking winter wardrobe essentials the denim tears hoodie offers more personality than typical basics. The craftsmanship adds story and meaning to the piece. I like how it pairs with both joggers and distressed jeans. If you’re shopping Christmas sales, this is one to consider.
ReplyDeleteBeen following Godspeed Clothing for a while now, and they keep improving. The drops are consistent, and the styling is unique without being over-the-top. Perfect for anyone who likes fashion with personality.
ReplyDeleteI love how Corteiz designs feel authentic, like they’re made for people who actually love streetwear. The details on their jackets and hoodies show they put thought into every release. Solid brand!
ReplyDeleteThis hoodie from Alchemai has been trending on my feed all week. The oversized fit and minimalistic design make it super appealing. Great to see new brands stepping up in the streetwear scene.
ReplyDeleteZawsze, kiedy widzę coś od Trapstar, wiem, że to będzie mocny projekt. Marka świetnie rozumie potrzeby fanów mody ulicznej.
ReplyDeleteReally enjoyed reading this! I’ve personally tried a few items from Asaali clothing, and the quality genuinely surprised me. Great option for people who want stylish wear without overspending.
ReplyDeleteJust checked out the Pink Palm Puff Store and I’m honestly surprised at how affordable their trendy pieces are. It’s rare to see such stylish items at prices that don’t break the bank.
ReplyDeleteThanks for sharing this! I’ve personally bought reps clothing a few times and was surprised at how comfortable the materials were. Some stores really put effort into stitching and packaging, making the experience feel premium even at a lower price.
ReplyDeleteBroken Planet has been gaining popularity for its creative approach to everyday wear. The hoodies especially caught my eye — they look cozy yet stylish. Anyone looking for modern streetwear with personality should take a look at their latest drops.
ReplyDeleteOnline shopping offers endless choices, and the ability to read customer reviews before buying makes it even more reliable. Whether it’s fashion, gadgets, or home essentials, everything is just a click away. Great time to shop smart and save more.
ReplyDelete“Really enjoyed your perspective here! Even though the topic’s different, I’ve been looking into how personal style influences our routines, and designers like Eric Emanuel are a good example of how clothing can blend comfort and confidence.
ReplyDeleteHappy Christmas, everyone! Thanks for posting such helpful info. Corteiz continues to set trends—curious to see what they release next.
ReplyDeleteAmazing read! I’m in full Christmas-shopping mode and saw some new g59 merch collections that match the vibe you’re talking about.
ReplyDeleteThanks for the insights! I was searching for winter streetwear trends and came across a Christmas Sale on sp5der tracksuits—definitely worth it.
ReplyDeleteSuch valuable information. Since none of us enjoy rushing holiday shopping, I just launched my Merry Christmas Sale early this year — hope it helps someone.
ReplyDeleteThis topic is well-covered here. I recently discovered Sean John while looking for holiday outfit ideas, and the reviews seem impressive. Glad I found this.
ReplyDeleteThanks for covering this topic. The rise of “fake gods” in social culture is fascinating. I explored similar points here: {Your Website URL}. Merry Christmas to all!
ReplyDeleteThis guide helped a lot! I recently bought from Eme Studios during their Xmas sale and the fit + style is exactly what I wanted. Highly recommend.
ReplyDeleteThis was really informative. I’ve been comparing VR apps and found Vrunk surprisingly versatile. Hoping the Christmas discounts come soon!
ReplyDeleteInteresting read! I’m currently doing some research on streetwear influences, and Kanye West merch seems to shape a lot of current fashion aesthetics.
ReplyDeleteI appreciate the insight here. Essentials hoodies are becoming a staple in my wardrobe. With so many Merry Christmas Sale offers, I’m planning to grab a few more.
ReplyDeleteStand out this season with kroen joggers. Their minimalist design complements sneakers and oversized tops, perfect for streetwear culture. The adjustable ankle cuff ensures a sharp finish. Shop exclusive Christmas discounts and enter the new year in trend-forward comfort.
ReplyDeleteDon’t miss out on year-end markdowns featuring select apparel and accessories. SDL’s clearance items include popular collections at unbeatable prices. These deals help customers stock up on wardrobe basics for less. Secure major savings from sdl before the Christmas sale ends.
ReplyDeleteHMDD clothing delivers a blend of comfort and clean aesthetics. Their premium cotton blends and modern silhouettes elevate winter outfits without sacrificing softness. Shop holiday sales that help you create looks that feel good and look polished. Quality, warmth, and effortless style await.
ReplyDeleteFinding gifts that make an impression gets easier with ktwo studios. Their minimalist streetwear suits multiple ages and style preferences. During the Christmas sale, gift bundles and select items drop to discounted rates. Surprise loved ones with premium clothing that speaks to authenticity and confidence.
ReplyDeleteThe festive collection at Sisters and Seekers is both stylish and affordable. Their Christmas promotions make holiday shopping stress-free. I’ll be buying more gifts here soon.
ReplyDeleteThis discussion made me think about holiday fashion trends. Kapital Clothing is currently running a Christmas sale that aligns perfectly with what people want right now—unique, stylish, and high-quality clothing. Their collection always feels expressive and artistic. It’s rare to find such craftsmanship at discounted prices. Definitely a brand worth exploring during holiday shopping.
ReplyDeleteI love reading posts like this during the holiday season because they help me plan ahead. For those still considering gift options, Trapstar clothing is running solid Christmas discounts. The brand combines comfort with bold design, which works well for younger shoppers.
ReplyDeleteI’m impressed by how well the Takashi Murakami shop clothing items fit into the festive mood of Christmas. The designs are playful and unique. Holiday deals make it easier to invest in standout apparel. Anyone who loves creative fashion will enjoy exploring this collection. A great blend of art and streetwear for the season.
ReplyDeleteThe pokemon hoodie seems perfect for gifting. Kids and adults alike love the playful design. Holiday deals make it a great buy this season.
ReplyDeleteReally enjoyed your article—holiday topics always get me in the spirit. With Christmas sales popping up everywhere, I’ve been comparing brands to find the best value. Godspeed Clothing currently has a solid holiday discount that feels worth browsing. Their styles work well for casual daily outfits and gift boxes alike. It’s nice finding a brand that stays consistent with quality.
ReplyDelete7 Heavens is a must-visit for holiday shoppers. Their Christmas deals on perfumes provide both style and value. Perfect for gifting or personal indulgence.
ReplyDeleteI’ve always loved Lattafa Perfumes for their distinct scents. The Christmas holiday sale adds even more value. A wonderful opportunity to explore their festive fragrance range.
ReplyDeleteThanks for the breakdown of trending winter fits. I found a chrome heart hoodie on a festive discount and it matches perfectly with the color themes you recommended here.
ReplyDeleteI love finding good fashion deals during December, and Corteiz really delivered this year. Their Christmas Sale features discounts across a wide range of items. The value is impressive considering their usual premium pricing. This could be one of the best times to try out the brand. I think many shoppers will appreciate the savings.
ReplyDeleteWith gift season here, shopping smart feels important. Corteiz Clothing’s Christmas Sale makes that easier with real, not inflated, discounts. The streetwear designs are always fresh and high-quality. Getting them at reduced prices is a win. Anyone building winter outfits should check it out.
ReplyDeleteInformative content. I just picked up a mr winston hoodie in the Christmas sale and the stitching feels super durable. Sharing this in case anyone else wants festive wardrobe upgrades.
ReplyDeleteŚwietna analiza! Warto wspomnieć że Stone Island ma teraz spore rabaty na Christmas Sale i to dobry moment na odświeżenie zimowej garderoby.
ReplyDeleteI love reading winter fashion guides like this because they make holiday shopping much easier. One item I recently picked up was the Alchemai Hoodie, which I discovered during a Christmas Holidays Sale. It’s soft, warm, and has a stylish look that makes it stand out. I think anyone wanting both comfort and aesthetic appeal will enjoy it. This could make a great Christmas gift as well.
ReplyDeleteExcellent breakdown of holiday buying trends. I’ve also come across great Christmas sale prices on the essentials hoodie which is perfect for cozy winter outfits. Worth exploring for sure.
ReplyDeleteW tym roku Trapstar naprawdę zaszalał z przecenami świątecznymi. Wiele kultowych modeli jest tańszych, co przyciąga ogromne zainteresowanie. Dobrze jest działać szybko, bo rozmiary znikają błyskawicznie. Promocje obejmują zarówno klasyczne, jak i nowe kolekcje. Myślę, że każdy fan streetwearu znajdzie coś dla siebie.
ReplyDeleteAppreciate the value this post provides. The essentials hoodie is trending hard due to attractive Christmas promos everywhere. Fashionable and practical choice.
ReplyDeleteBardzo dobre wskazówki! Warto pamiętać, że Lattafa perfumy mają teraz mocne rabaty na Boże Narodzenie.
ReplyDeleteCosy Wrap II Women’s Extreme RDS jackets for women, ultra-warm, and responsibly sourced for unbeatable cold-weather comfort.
ReplyDeletejackets for women