<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Daniel Kloyber on Medium]]></title>
        <description><![CDATA[Stories by Daniel Kloyber on Medium]]></description>
        <link>https://medium.com/@danielkloyber?source=rss-ca068dfbaf3f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*qsaM8AqZE656gOrh.</url>
            <title>Stories by Daniel Kloyber on Medium</title>
            <link>https://medium.com/@danielkloyber?source=rss-ca068dfbaf3f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 18:24:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danielkloyber/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Microsoft Forms quiz results in PowerAutomate]]></title>
            <link>https://danielkloyber.medium.com/microsoft-forms-quiz-results-in-powerautomate-62c3ed7948c1?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/62c3ed7948c1</guid>
            <category><![CDATA[microsoft-office]]></category>
            <category><![CDATA[microsoft-forms]]></category>
            <category><![CDATA[power-automate]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Tue, 19 Nov 2024 17:39:01 GMT</pubDate>
            <atom:updated>2024-11-19T17:41:02.051Z</atom:updated>
            <content:encoded><![CDATA[<p>#powerautomate #microsoftforms #excel #quizes</p><h3>TLDR</h3><p>The only way we managed to get quiz score results in Power Automate, was to download the results file using “Get web resource” and the endpoint <a href="https://forms.office.com/formapi/DownloadExcelFile.ashx?formid=&amp;timezoneOffset=-120&amp;__TimezoneId=Europe/Bucharest"><em>https://forms.office.com/formapi/DownloadExcelFile.ashx?formid=</em></a><em>[formid]</em>, save it to OneDrive and fetch the score using the form id in the trigger and the Excel file.</p><h3>The longer version</h3><p>There are certain things that should be really easy — like using your credit card, starting your car, paying your taxes… getting the score of a Microsoft Forms Quiz in PowerAutomate.</p><p>And to be honest, that’s what we expected when we quoted for a 2 hours project with one of our favorite customers.</p><p>Scenario (simplified) is as follows: you have quiz, users fills out quiz, if the score is larger than X he receives an email. If the quiz score is smaller than X he receives a different email. Sounds… simple, right?</p><h3>Starting point</h3><p>You have “well known” trigger in PowerAutomate called “When a new response is submitted”. This will start your flow, when the quiz response is submitted. All good…</p><p>Then, somewhat unexpectadly — you can fetch the answers in the quiz using “Get response details”.</p><p>All makes sense… right?</p><p>Then you would expect that the score is part of the response — and here is your first surprise… it’s not… tztztz…</p><h3>Going deep</h3><p>Of course you google (bing) your life away and search for some smart people that solved this before you. Common answer will be to use “Send an HTTP request to SharePoint” to fetch the data using an “undocumented” <em>API endpoint: </em><a href="https://forms.microsoft.com/formapi/api/b36f4c0f-b916-40ae-ad8b-d2f0ea4f8868/users/3ca82ab5-5757-4da5-84a8-ec281cf06b5c/light/forms(&#39;D0xvsxa5rkCti9Lw6k-IaLUqqDxXV6VNhKjsKBzwa1xUN0lYQlQ4RTA0OFZMVTVTN1VSRlpTUFlGRi4u&#39;)"><em>https://forms.microsoft.com/formapi/api/[tenantid]/users/[userid]/light/forms(&#39;[formid]&#39;)</em></a><em> </em>.</p><p>But this will not work — for a couple of weeks now, Microsoft has locked down “Send an HTTP request to SharePoint” and you can no longer use it ot make calls no non-SharePoint endpoints.</p><p>So… you google again and insted use: “Invoke an HTTP request” the preauthorized kind (while setting both base url and res uri to forms.office.com).</p><p>And this will indeed fetch your form definition.</p><p>You can then calll the <em>API endpoint: </em><a href="https://forms.microsoft.com/formapi/api/b36f4c0f-b916-40ae-ad8b-d2f0ea4f8868/users/3ca82ab5-5757-4da5-84a8-ec281cf06b5c/light/forms(&#39;D0xvsxa5rkCti9Lw6k-IaLUqqDxXV6VNhKjsKBzwa1xUN0lYQlQ4RTA0OFZMVTVTN1VSRlpTUFlGRi4u&#39;)"><em>https://forms.microsoft.com/formapi/api/[tenantid]/users/[userid]/light/forms(&#39;[formid]&#39;)</em></a><em>/responses </em>to get all the responses.</p><p>But surprise — the score is still no there. Someone once, a long a time ago, had the intention of adding it (but the quizResult is null):</p><pre>{<br>   &quot;releaseDate&quot;: &quot;0001-01-01T00:00:00Z&quot;,<br>   &quot;quizResult&quot;: null,<br>   &quot;comments&quot;: [],<br>   &quot;emailReceiptConsent&quot;: null,<br>   &quot;submitLanguage&quot;: null,<br>   &quot;msRewardsData&quot;: null,<br>   &quot;answerExplanation&quot;: null,<br>   &quot;id&quot;: 3,<br>   &quot;startDate&quot;: &quot;2024-11-19T15:47:27.8733188Z&quot;,<br>   &quot;submitDate&quot;: &quot;2024-11-19T15:47:34.6163188Z&quot;,<br>   &quot;responder&quot;: &quot;anonymous&quot;,<br>   &quot;responderName&quot;: &quot;&quot;,<br>   &quot;answers&quot;: &quot;[{\&quot;answer1\&quot;:\&quot;Pigeon\&quot;,\&quot;questionId\&quot;:\&quot;rc1c1d5c6157742b5b7d998c6549f7414\&quot;},{\&quot;answer1\&quot;:\&quot;Gorilla\&quot;,\&quot;questionId\&quot;:\&quot;r785260c1a29646a2a1a73486a752b828\&quot;},{\&quot;answer1\&quot;:\&quot;Panda bear\&quot;,\&quot;questionId\&quot;:\&quot;r8c1d1bb584cc4f6b8602d69cf17c299d\&quot;},{\&quot;answer1\&quot;:\&quot;Snail\&quot;,\&quot;questionId\&quot;:\&quot;r7cff49bfd1fb46a2a582f6436e08bcc0\&quot;},{\&quot;answer1\&quot;:\&quot;Whale\&quot;,\&quot;questionId\&quot;:\&quot;rf558fd4ef2b749659f24bde830355ad4\&quot;}]&quot;<br>  },</pre><p>We then tried all possible query filters and parameters to get the quizResult to populate — but no dice. It stubbornly stayed null. Sad…</p><p>We then had a look at the source code of the actual Forms UI and found a couple more endpoints like:</p><p><a href="https://forms.microsoft.com/formapi/api/b36f4c0f-b916-40ae-ad8b-d2f0ea4f8868/users/3ca82ab5-5757-4da5-84a8-ec281cf06b5c/light/forms(&#39;D0xvsxa5rkCti9Lw6k-IaLUqqDxXV6VNhKjsKBzwa1xUN0lYQlQ4RTA0OFZMVTVTN1VSRlpTUFlGRi4u&#39;)"><em>https://forms.microsoft.com/formapi/api/[tenantid]/users/[userid]/light/forms(&#39;[formid]&#39;)</em></a><em>/GetAggregateQuizData</em></p><p>This will return the Form statistics — but again, no details on each answer individually.</p><p>We then tried to trace how Excel syncs to the results — and besides a couple of bugs (like the file will show deleted responses indefinetly) there was nothing really usefull there.</p><h3>The evrika moment</h3><p>We then looked at the download Excel functionality — and noticed that it is not linked to the “live” Excel file. The data was also correct (if you remove the minResponseId and maxResponseId). Joy, joy!</p><p>So in the end we had the following process:</p><ul><li>form submission triggers the flow.</li><li>we get the excel file with the quiz scores and answers using this endpoint: <a href="https://forms.office.com/formapi/DownloadExcelFile.ashx?formid=&amp;timezoneOffset=-120&amp;__TimezoneId=Europe/Bucharest"><em>https://forms.office.com/formapi/DownloadExcelFile.ashx?formid=&amp;timezoneOffset=-120&amp;__TimezoneId=Europe/Bucharest</em></a></li><li>the fetch we complete using “Get web resource” so we can authenticate against forms.office.com (just like we did above).</li><li>we save it OneDrive with a random name: <em>concat(guid(),’.xlsx’)</em></li><li>and then we use “Get a row” activity to fetch the actual score (we got lucky here cause the table is always called Table1 and there is an ID row that corresponds to the response id in the trigger, and we use the file identifier from the Create file).</li></ul><p>Simple… right?… lool…</p><h3>Conclusions</h3><p>Well… this will work for a while — but it could have been sooooo much easier. Makes Forms / Power Automate intergration seem a little bit unbaked.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62c3ed7948c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud resource taxonomy (in Azure)]]></title>
            <link>https://danielkloyber.medium.com/cloud-resource-taxonomy-in-azure-ca89da10fd6e?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca89da10fd6e</guid>
            <category><![CDATA[software]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[taxonomy]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Thu, 04 May 2023 19:27:21 GMT</pubDate>
            <atom:updated>2023-05-04T19:27:21.132Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VIFsPgofBzT4UNeBWALrXw.png" /><figcaption>Old Daniel wondering what the heck is happening in his tenant.</figcaption></figure><p>Over the years I started cloud migrations for a number of companies — larger and smaller, in different lines of business and with very different philosophies.</p><p>Every time, I got the same request: “start small”.</p><p>“Find something easy to do, cheap, low risk — but impactful and relevant. Show off what the cloud can do so we get a buy-in from the board — and just then can we go full speed ahead.”</p><p>All cloud stories I know — start small and slow.</p><p>And then three years later — they look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aY9j2WMURCkeEXi96q547Q.png" /></figure><p>Hundreds of resources, tens of resources groups, vm’s, networks, adapters and what not — all contributing to a sense of chaos, and continuously growing costs. Naturally you loose track, and eventually control.</p><p>The cloud is just as bad as your old school data center.</p><p>At some point — you have to re-organise and rethink everything you have done over the years. Even worse — many times, you have to rethink and reorganise what OTHERS have done over the years.</p><p>Been there? Done that?</p><p>That’s when you’ll be surprised how difficult it is to rename resources, move them around, structure them differently, get a sense of what is used for what.</p><p>I did some research — and found little information on how this chaos can be managed(<a href="https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming">Define your naming convention — Cloud Adoption Framework | Microsoft Lear</a>n — is a good resource). So, I had to come up with my own system — not saying it’s perfect — but it works ok for me.</p><p>It all starts with the taxonomy of the resources.</p><p>All resource group names follow this structure: <strong>customer-project-level-rg.</strong></p><p>An example would be: <em>contoso-publicsite-production-rg</em>. The name itself states clearly what the RG is all about.</p><p>Then the resources in the RG are named with the following convention: <strong>customer-project-level-resourcetype-indentifier.</strong></p><p>An example here would look like: <em>contoso-publicsite-production-cosmos-1</em>. At a glance — you know what you are dealing with.</p><p>An exception are storage accounts where the dashes are not allowed in the name. For such — we just skip the dashes but keep the rest of the convention.</p><p>All of these rules are enforced by some rather crude Azure Policies (crude because policies don’t support regex). This keeps all new resources aligned and we can also see how many ‘uncompliant’ resources we still have.</p><p>Then the second step are tags. We have 5 tags we enforce via policy on every resource:</p><p><strong>Customer</strong> — this would be a shorthand for every customer we work for (or our own company if its an internal project)</p><p><strong>Level</strong> — this reflects if we use this resource for dev / staging / testing / production.</p><p><strong>Project</strong> — generally we have all the resources assigned to a project.</p><p><strong>Billable</strong> — we use a flag for resources where the consumption is billed to a customer.</p><p><strong>PII</strong> — this is again just a flag that will identify if the resource uses PII data.</p><p>Based on these flags we can then query costs, consumption, usage or enforce different policies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*yE7SPl_k0LA0Txpk2hyBig.png" /><figcaption>Costs based on tags</figcaption></figure><p>Of course the flags are also enforced by an Azure Policy that applies to all our resources.</p><p>And, that’s pretty much all there is to the technical part.</p><p>Just as important is the processes part — where we try to enforce the consistent use of these policies for all our resources. Some are enforced by Azure Policies — but some are just business processes.</p><p>For example: everything we do in Azure is part of a project. This way, we have an appropriate “box” where to put it.</p><p>Additionally we use a couple of different subscriptions. I don’t have a clear pattern here — but generally we try to discern between: SAAS offerings, resources hosted for clients, and internal tools.</p><p>I know there is even a higher hierarchical level (“Management groups”) that allow you to group multiple subscriptions — but honestly, I have not used those yet.</p><p>In a nutshell — thats how we uncluttered some of the tenants that we got to work with.</p><p>It might sound like a daunting tasks — because it is.</p><p>On the other hand — if you are just beginning your cloud road (if there still are such companies) — make sure to think of these topics way before you reach the 1000 rg’s level.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca89da10fd6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud service levels — what should I expect?]]></title>
            <link>https://danielkloyber.medium.com/cloud-service-levels-what-should-i-expect-3a537deb699c?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a537deb699c</guid>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[it-services]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[service-level-agreement]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Thu, 30 Mar 2023 14:22:11 GMT</pubDate>
            <atom:updated>2023-03-30T14:22:11.740Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cloud service levels — what should I expect?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xg-RM5Gk679zTTBz8JvKBA.jpeg" /></figure><p>Back when I was a student, 10540 years ago, a friend gave me an old two-processor / two-core server — that was way past its prime.</p><p>Think 512 MB / 300 Mhz / 1GB HDD. It weighed somewhere around 30 KG, made more noise than a small truck and probably could heat an apartament when running under load.</p><p>Soo… me being a poor, but geeky student, convinced a colleague in our dorm to have this beast in his room, running 24/7, configured it for remote access, did some routing magic in our dorm network and this way had my first cloud computer.</p><p>OK… was not really a cloud computer. The term cloud was not yet coined back then — but you get the idea.</p><p>It ran for around 3 semesters (1.5 years), had an average uptime of about 200 days (once rebooted for updates once because of power failure) and ran our small sites and other site projects. We only had one internet provider — but I would say that we very close to the mythical 99.999% uptime.</p><p>Eventually the HDD burned down, we got it a new one, added some more RAM and a colleague who had no PC took it with him on his Erasmus semester in Germany. (by bus)</p><blockquote>These experiences are based on using Microsoft Services. I don’t have enough experience to write about other providers, but I imagine it’s similar.</blockquote><p>Nowadays creating a VM or some other kind of compute instance with way superior capacity takes less than a minute, is rather cheap, accessible and ubiquitous in our day to day work.</p><p>But what service level exactly can you expect from these offerings? Will they give you the uptime you need to run real business loads?</p><p>I was musing about this subject last days — mostly inspired by a series of incidents that broke some of the services I have been working on.</p><p>On paper all major cloud providers are promising the mythical five-nine 99.999% guaranteed up-time. The reality though is somewhat different.</p><p>The service level also depends — well on the service. Some perform amazingly consistent, while others are somewhat flaky.</p><p>As a general observation — I have noticed that IAAS offerings are by far the most stable ones, while SAAS and PAAS are more temperamental.</p><p>Here are some measurements / observations over the past 6 months, based on the services we are running:</p><p>IAAS services (VMs, Networks, Storage) — generally speaking exceed the 99.999 uptime. This of course depending on how you measure. At points we had issues with provisioning new instances, but once they were up, we had 0 problems running them for long periods of time without incidents.</p><p>PAAS services (Web Apps, Static Web Apps, Cosmos DB, Functions, SQL Databases) were something of a hit or miss. While Web Apps, Cosmos and SQL were always up and almost never affected by performance fluctuations, Azure Functions and SWA’s are an entirely different story.</p><p>SWA’s were down for hours at a time, over the last months, in outages that seemed to affect the West Europe region the most.</p><p>Functions had fluctuating performance, sometimes having cold starts of 5–10 seconds and sometimes at around 60 seconds (for the same exact code).</p><p>SAAS offerings (Office 365, Teams, Github…) are again somewhat of a hit or miss. We had isolated incidents (that affected just a couple of features) that sometimes took days to fix. For example we were not able to delete SharePoint list for a couple of days. We could not use Teams for Mac for desktop sharing on certain tenants. PowerAutomate flows got stuck for a couple of hours. Github Actions were out-of-action for a couple of hours.</p><p>In general we can say that SAAS offerings are doing the worst when it comes to stability and uptime.</p><p><strong>So, how does this compare to on-premise service levels? </strong>(No, not my old computer, but the hundreds of corporate systems I have interacted with over the years)</p><p>Well, again it depends. The general uptime is similar I would say.</p><p>What really makes a difference are the particular features. I have many times seen server farms that had a 99.999% up time, but at the same time, had certain features / services not working for months.</p><p>For example, we had many SharePoint farms that were in essence functional, but SharePoint Search was not giving any results.</p><p>And in this regards, the cloud services are dominating the on-premise space. (I guess that is why we don’t really have an on-premise space anymore)</p><p>On the other hand — on-premise IAAS was doing similarly well — with one difference — update / upgrade windows. Screw that up — and you broke your record for the year.</p><p>But there is one thing — something very particular, that makes me miss on-premise days.</p><p>And that is <strong>TRANSPARENCY.</strong></p><p>When on-premise was down, it took us a couple of minutes, or an hour max to have an exact image of what was happening. Not always a solution — but at least an idea.</p><p>And when that dreaded call from management came in — we had answers. We could set expectations. We had control.</p><p>And this transparency in the Azure Cloud / Office 365 is <strong>non-existent.</strong></p><p>The Azure Service Dashboard is a joke — we were sometimes offline for 8 hours, with multiple incidents, GitHub threads, forum posts — and the dashboard was still “all-green”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n5pSOe0u5dvOJt3vIW2PiA.png" /></figure><p>We setup alerts for service disturbances — and never really got any of them. Zero alerts. Nada. But the service was down for hours.</p><p>We opened tickets and got evasive answers.</p><p>And this <strong>really hurt us</strong>. When your service provider claims 99.999% uptime, you promise at least something similar to your end-customers.</p><p>And when you don’t deliver that — it’s hard to shift the blame on Microsoft. It’s even harder when Microsoft is not owning-up to these incidents.</p><p>We actually lost projects because of this (sadly we had to demo during an SWA outage that took 4 hours to be solved), and we also had to change technology for a couple of projects because of bad service.</p><p>On paper, you can ask for compensations when you have major incidents — and more out of curiosity we tried.</p><p>It was a joke… a dumb joke. A very dumb joke. I won’t go into details — but I think the support ticket for that topic is still open (one year later).</p><p>Sometimes I wonder if I ask for too much — but in this case, I don’t think I do.</p><p>When Github actions were down — it took them minutes (minuteeesss, Azure) to post a message. They set expectation, people knew what was happening. We had answers for our customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tJmMbdv3LvLKTXJhU5JAaw.png" /></figure><p>If Github can do it — why is Azure failing at this so miserably?</p><p>I am not pointing fingers or trying to shame the Azure team.</p><p>I am just curious.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a537deb699c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PNPJS and Site Scripts]]></title>
            <link>https://danielkloyber.medium.com/pnpjs-and-site-scripts-a3f6a4c6fec8?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3f6a4c6fec8</guid>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[spfx]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Thu, 19 Jan 2023 14:43:59 GMT</pubDate>
            <atom:updated>2023-01-19T14:43:59.506Z</atom:updated>
            <content:encoded><![CDATA[<p>Never really bothered to count, but if I was to guesstimate, 90% of my posts are the result of sheer frustration. The I-do-everything-by-the-book-and-its-not-working kind of frustration.</p><p>Todays culprit, the following (simple) scenario: you want to use pnpjs in an spfx app extension to copy a list structure from a template site to a destination site.</p><p>To spare you the drama, here is my solution:</p><pre>const ss = await this._spfi.siteScripts.getSiteScriptFromList(<br>      &quot;https://path_to_your_web/Lists/ListTemplate1/AllItems.aspx&quot;<br>    );<br><br>const response = JSON.parse(ss);<br><br>const actions = response.actions;<br>  <br>const rs = await this._spfi.siteScripts.executeSiteScriptAction(JSON.stringify(actions[0]));</pre><p>Two issues here:</p><ol><li>The api endpoints used here are not really documented by Microsoft, more like they were reverse engineered and then added to PNPJS. Sooo… they might change.</li><li>The whole string to json to string kind of situation is a bit weird. I am sure you can find better ways — but this works for me and I finally want to move on with this.</li></ol><p>Might be wrong — but this could be the first post on the topic.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3f6a4c6fec8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Surface Book 3 — ohh, the sorrow…]]></title>
            <link>https://danielkloyber.medium.com/surface-book-3-ohh-the-sorrow-ae5b4fc0a84d?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae5b4fc0a84d</guid>
            <category><![CDATA[setup]]></category>
            <category><![CDATA[surface-book]]></category>
            <category><![CDATA[surface-book-3]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[laptop]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Tue, 26 Oct 2021 20:42:14 GMT</pubDate>
            <atom:updated>2021-10-26T20:43:21.857Z</atom:updated>
            <content:encoded><![CDATA[<h3>Surface Book 3 — ohh, the sorrow…</h3><p>I spent a lot of time working at Microsoft — so naturally, I am kind of a fan boy.</p><p>When I had to renew my work laptop, I actually delayed the purchase for almost 2 years so I can get the 2020 Surface Book 3. That was supposed to be my main driver and laptop of my dreams.</p><p>Now… more than one year after the purchase… I can only give you this advice: <strong>“please stay away from this heap of junk”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*uDDjNz0rrutbYc4x0VUY9A.gif" /></figure><p>This is not the work-horse it’s supposed to be… it’s a gimmicky, poorly built and not entirely thought-through device that will leave you very disappointed.</p><p>I guess many of the problems go back to the convertible factor:</p><p>- when I freshly boot the laptop, the NVidia card is not visible. I have to detach and re-attach before it becomes visible.</p><ul><li>even so, the NVidia card is actually never used. I still have to see one application that makes use of it. (and I run both graphic loads and ML processing that should be optimized for the graphic card)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BJ2m48soroGDQu8FnMb6wQ.png" /></figure><p>- under heavy load the main unit (where the processor is) overheats, and in order to function the device does some aggressive thermal throttling. You CANNOT run computational heavy loads on this device because of that. (<a href="https://www.reddit.com/r/Surface/comments/mk32z9/surface_book_3_overheating_a_lot/">Surface Book 3 Overheating a LOT : Surface (reddit.com)</a>)</p><p>- the Surface Dock 2 promises two 4K monitors — but that makes the whole system extremely sluggish. You will have problems watching YouTube videos in this configuration (that kind of sluggish).</p><p>- Windows 11 — made the performance problems even worse. I am not sure if this will be fixed with updates or it just is the way it is. But, right now, in lieu of the Surface Studio laptops, this is the freaking flagship laptop, and the experience is mostly underwhelming.</p><p>Anddd… to top this all off… yesterday some keys stopped working. Out of the blue, 5, 0, 9 and a couple other keys were simply no longer responding. In the morning the problem disappeared, but in the evening a couple others were gone. This is NOT a software issue. While doing some googling on the matter it turns out I am not the only one with this kind of problems.</p><p>What makes everything worse, is that this laptop is my main work horse, the prime tool in my arsenal, the bread winner of the household.</p><p>I wonder if this is the time where I should give up on Microsoft hardware and switch to something else?</p><p>Are the M1’s ready to accommodate professional workloads? (beside the media intensive ones)</p><p>What do you use as your main driver? Are the other Microsoft models any better?</p><p>What I know for sure, I cannot really trust Microsoft hardware anymore. And this betrayal… really hurts.</p><p>(disappointed fanboy face)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*bQBClDkkuAnIj99m7cJ1xw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae5b4fc0a84d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[That one little thing… that will drive you mad]]></title>
            <link>https://danielkloyber.medium.com/that-one-little-thing-that-will-drive-you-mad-924141454f79?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/924141454f79</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[action]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[aspnetcore]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Mon, 08 Feb 2021 19:33:46 GMT</pubDate>
            <atom:updated>2021-02-08T19:37:32.810Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E_mpPn4tMWeHr-YL" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I write code. I really like to write code. I do it every day. At work, in my spare time… sometimes even in my dreams.</p><p>Most of the times it’s enjoyable.</p><p>You chug along and write your features, fix your bugs, do your tests and then repeat.</p><p>Some times it’s amazing.</p><p>It’s like poetry.</p><p>It has a flow, a logic to it, something magic that makes the result just perfect (until you review it the next day).</p><p>And then, other times, it makes me wanna go berserk.</p><p>I feel like braking my keyboard, burning down my laptop and never doing anything digital ever again.</p><p>Today was one of those days — and this is the (short) story of what happened.</p><p>Recently I started playing with a new technology stack: .Net Core + React + Typescript.</p><p>Not really new in the “piece by piece” sense— but the way I put it together, is new for me.</p><p>The VS2019 template for ASP.Net Core will create a cute React sample that you can run. The WebApi part can be easily extended, and in theory the whole thing will fit neatly in an Azure WebApp.</p><p>You can copy your C# types easily to TS and there are many other perks that I am just discovering.</p><p>But then problems start — the react app, is not really Typescript compatible.</p><p>So… you can try to add Typescript to it, or you can just delete, and scaffold a new CRA project with Typescript in its place.</p><p>But… the new project does not allow capital letters, and the naming convention in the ASP.Net Core app has capitals… so this little detail, bugged for one hour. (yeah, I can sometimes be like that — but just think of it, this means that the sample in VS is created with an outdated RCA)</p><p>But then I just renamed the folder created by RCA and everything was cool.</p><p>Then I wanted to use Typescript in VS2019 — and to my surprise the TS Extensions for Visual Studio, is not installed by default.</p><p>So… I installed the first hit in the Marketplace, but that installed TS 2.something. That gave me some crazy errors in my RCA project, so basically I was not able to use VS2019 but VSCode was working just fine.</p><p>2 hours later and the correct extension installed, TS was working as expected.</p><p>The final problem though — takes the cake.</p><p>You have your shiny new little project and you want to deploy it to an Azure Web App.</p><p>In theory (and Microsoft tutorials) this should be as easy as going to the deployment center and creating a connection between the GitHub repo and your Web App.</p><p>The GitHub Action (<em>Build and deploy ASP.Net Core app to Azure Web App</em>) is created for you and the deployment goes through without issues.</p><p>But… the front-end is not there. After checking all kinds of possible causes you look at the logs and get a file not found.</p><p>The build folder is empty!!! Ohhh… nooo…</p><p>But whyyyyy… the pipeline ran succesfully. Whhyyyy?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzqJgYyF5dh9KLFVKCFXiA.png" /></figure><p>Well… after some testing and a lot of swearing it turns out that</p><blockquote>dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp</blockquote><p>the command that is configured in your deployment action— is actually skipping the build folder of the React client app. So… you only deploy the back end, although you build also the front-end.</p><p>It’s just not part of the deployment artifact.</p><p>Pfff… solution… easy peasy — you can just robocopy the files from the build folder to the deployment folder:</p><blockquote>robocopy .\clientapp\build\ ${{env.DOTNET_ROOT}}\myapp\clientapp\build /E</blockquote><p>Buttt… robocopy has non-standard return values.</p><p>The little bugger will return 1 for success, and GitHub actions will consider that to be an error and skip the next deployment steps.</p><p>You can of course try to rewrite the exit code — and thats what I did, but, alas, 1 hour later, I was so deep this rabbit hole that I got totally frustrated.</p><p>So… I just did a step with:</p><blockquote>- name: copy client app</blockquote><blockquote>run: Copy-Item .\clientapp\build\ -Destination ${{env.DOTNET_ROOT}}\myapp\clientapp\build -recurse</blockquote><p>and had a working deployment pipeline with .NET Core, React, Typescript, GitHub and Azure Web Apps.</p><p><strong>TOTAL EFFORT: 6 hours or so. <br>BILLABLE EFFORT: ~0 hours.</strong></p><p>If for what ever reason this evening somebody will tell me dev’s have an easy life… I will punch him in the face. Maybe…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=924141454f79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What (t*****k) happened to our Azure Data Factory costs]]></title>
            <link>https://danielkloyber.medium.com/what-t-k-happened-to-our-azure-data-factory-costs-22b8a763faf?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/22b8a763faf</guid>
            <category><![CDATA[azure-data-factory]]></category>
            <category><![CDATA[azure-cost-management]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Mon, 17 Aug 2020 12:38:44 GMT</pubDate>
            <atom:updated>2020-08-17T12:38:44.726Z</atom:updated>
            <content:encoded><![CDATA[<p>First Azure joke I ever heard was: “Azure Pricing — you need a PHD to understand that”.</p><p>Sad… but true.</p><p>There are not many people out there I have not told this yet — but we are building a new data warehouse.</p><p>A NEW data warehouse, using Azure Data Factory, Azure SQL, Azure Data Lake and a couple more systems that we managed to integrate.</p><p>And yes — I know, we are Microsoft-centric, and yes, I can imagine, there are many opinions about this — but I don’t care right now.</p><p>I wanna tell you the story of our first beginner trap — how we fell for it and how we plan to stay out of them in the future.</p><p>In general we are uber-happy with pricing of the Azure services we are using.</p><p>In a good month we are probably below 100 Euros, for our current (beginner) business needs, but we still get all the coolness. To be honest, costs are a huge factor for us, especially these days.</p><p>We are actually so happy with the pricing, that after keeping a keen eye on the costs for the first couple of months, we now only look at the end-of-the-month invoice.</p><p>Not little was my surprise to see that we paid considerably more (still not that much) for July than what we paid for the last couple of months. So… I had to investigate…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_D1PuSeC6rcD8pz5ZsKQg.png" /></figure><p>This is the story of how we needlessly spent ~90 Euros of Azure consumption:</p><ul><li>A key part of our DWH is an exchange rates dimension, that allows us to integrate different locations that operate in national currencies.</li><li>We use the ECB rates for now, and at the time, we used to fetch them from here: <a href="https://api.exchangeratesapi.io/">https://api.exchangeratesapi.io/</a></li><li>The response is a JSON file, that we flatten using data flow and then we write to SQL table. We flatten it because we need to add exchange rates from other sources as well. The end result is a SQL table similar to this one:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LUhK74Ssqp-pEV7vT6GLbQ.png" /><figcaption>The actual currency rate data we put in our Data Warehouse</figcaption></figure><ul><li>Historical data was fetched (all at once) using a very simple/basic/stupid Python script similar like this one:</li></ul><blockquote>import requests</blockquote><blockquote>import datetime</blockquote><blockquote>baseurl = ‘<a href="https://api.exchangeratesapi.io/">https://api.exchangeratesapi.io/</a>&#39;</blockquote><blockquote>currency_name = “EUR”</blockquote><blockquote>for x in range(0,20):</blockquote><blockquote>today = datetime.date.today() — datetime.timedelta(x)</blockquote><blockquote>currency = ‘?base=’ + currency_name</blockquote><blockquote>currency_url = baseurl + str(today) + currency</blockquote><blockquote>r = requests.get(url = currency_url)</blockquote><blockquote>filename = str(today) + “_” + currency_name + “.json”</blockquote><blockquote>f = open(filename, “w+”)</blockquote><blockquote>f.write(str(r.json()))</blockquote><blockquote>f.close()</blockquote><ul><li>We then copy the files to an Azure Data Lake folder, convert them to CSV, un-pivot them, add some columns and push them to SQL using a Data Flow.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SeCuMfOvM3AroMpL9S0nvQ.png" /></figure><p>When I noticed the excessive costs for last month, somehow I guessed this could be the only cause, so we confirmed this in the ADF monitoring reports:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AAupz0aVUm29K8nLqqUlPA.png" /></figure><p>We have some 4 similar jobs, one for each currency we were interested in.</p><p>The actual costs are caused by the “Data movement activities”, the 133 DIUs costing around 30 Euros.</p><p>30 EUROS for one freaking pipeline run — THAT CANNOT BE RIGHT.</p><p>We moved around 4000 files through this pipeline, and as you can see, the costs for vCore-hour are very decent.</p><p>Turns out the actual problem was the number of files being fed to the ADF Data Flow.</p><p>It’s still a mystery for me how the DIU-hour are calculated, but it seems that when you parallelize a lot of file ingestion operations using “Data flows” they all count up in your DIU balance. It’s not like running one Pipeline with parallel actions it’s more like many (thousands) of pipelines in parallel.</p><p>This seems to be what exploded our DIU’s counter.</p><p>I did the following test: merged our files into larger CSVs (with 6000 rows) instead of 6000 CSV’s with one row and the costs went back to less than 30 cents / pipeline run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ogKjtsZ190ZBrPD-Ofvqg.png" /></figure><h3><strong>To summarize this lesson: when using ‘Data flows’ prepare the data upfront so that instead of many small files you can use one large file instead. The costs savings can be huge.</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22b8a763faf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The invisible war — in your computer]]></title>
            <link>https://danielkloyber.medium.com/the-invisible-war-in-your-computer-ff9e2a5ecbb9?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff9e2a5ecbb9</guid>
            <category><![CDATA[analysis]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[office-365]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Mon, 03 Feb 2020 15:34:37 GMT</pubDate>
            <atom:updated>2020-02-03T15:39:43.010Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mIHnTWh0_lj-uuEv" /><figcaption>Photo by <a href="https://unsplash.com/@chanphoto?utm_source=medium&amp;utm_medium=referral">Chandler Cruttenden</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The invisible war — in your computer</h3><p>For us this became apparent (again) last Thursday.</p><p>Here is the story:</p><p>Around 9.30 in the morning, one of our colleagues working in accounts payable received an email, where one of our directors seemed to ask her, to do some “secretive” payments.</p><p>The email tried to spoof the email address of the director, and was targetet at the exact person who is responsible for making payments in her organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*qxZ3B69X70nYtkCkd8vPvA.png" /><figcaption>Spoofing email asking for a fraudulent payment — see how they added an email address as the name registered for the @gmx address.</figcaption></figure><p>One hour later — someone called the public phone extension, and got transferred to our colleague where he insisted about the payments that needed to be made.</p><p>Luckily the colleague in question was aware of this kind of criminal activities and immediately alerted us.</p><p>Some 30 minutes later — we noticed some abnormal activity from another account — that was sending out phishing emails to the whole address book.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*jnK9_E_zO331F2fbkY9ItA.png" /><figcaption>Phishing email that tried to imitate an OneDrive sharing email</figcaption></figure><p>We blocked this account — and started our investigation.</p><p>The complexity of the attack that unraveled shocked us.</p><p>At some point, end of 2019, one of our partner companies (lets say company <a href="http://twitter.com/abci">@abci</a>.com), suffered what seems to be a major breach. Emails and documents were stolen.</p><p>Armed with this information a criminal organization started to target the business partners of the hacked <a href="http://twitter.com/abci">@abci</a>.</p><p>First they registered a new domain called <a href="http://twitter.com/abcl">@abcl</a> (basically substituting the i with an l).</p><p>They used that domain to send out emails impersonating <a href="http://twitter.com/abci">@abci</a> personnel and asking for the payment of what seemed legitimate invoices — but to illicit account numbers.</p><p>Then they targeted some of our own key users with a phishing attempt, using hacked accounts from another partner organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*xJ33_tzomWdVUU55EWCRRw.png" /><figcaption>A false login prompt that is trying to convince users to enter their credentials</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*TTgGyJCYZdIdtQ6LBYrJmg.png" /><figcaption>False sharing invitations — that tried to convince the user to click on the links above. Note how they are customized for each domain.</figcaption></figure><blockquote>We have seen this a lot in the past. Usually when the links are sent directly in the email body — they are filtered by malware protection. If the link is part of a sharing scam link — they get through.</blockquote><p>They got access to one account and followed a pre-established number of steps:</p><p>1. They created rules to delete all messages coming from the <a href="http://twitter.com/abci">@abci</a> domain that they were spoofing.</p><p>2. They created rules to delete all messages that contained information about possible phishing attempts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*EfnPyCo6SdSVjKIfmVoEXA.png" /><figcaption>A rule created to stop users from receiving emails about phishing campaigns. That is not a typo — in one of the mails from our partners they actually used fishing instead of phishing — meaning the criminals were trying to hide a very specific email thread.</figcaption></figure><p>3. They sent out emails that tried to convince our colleagues to do the illicit payments.</p><p>4. They created email rules that were meant to forward all invoices and bank information to a gmail account.</p><p>5. They tried to persist the hack by adding malware documents to different calendar items.</p><p>6. They hard-deleted all the emails that were related to the initial attack to cover their tracks.</p><p>At what seemed to be a critical point in time — they actually called our colleague, and armed with the information from the false emails tried to pressure that person into making the payments.</p><p>After all these attempts failed — they used the compromised account to send out phishing emails in order to maybe widen the number of compromised accounts.</p><p>Based on all the information we have — no critical information from our side was compromised, and the security breach was contained rather quickly.</p><p>On the other hand — most of the links, the compromised accounts in our partner organizations, the malware documents — are still there, meaning we are probably the only organization who became aware, from the 3 that were targeted.</p><p>I will not go into details (for obvious reasons) but after this incident, we upped our security settings a lot.</p><p>We use Lepide and Azure Sentinel for intrusion detection and analysis — and we decided to do a regular manual analysis of all the attack vectors used in the attempt.</p><p>We have a couple of new rules that should make this kind of attacks harder in the future.</p><p>The most important change though is a principle we adopted — from now on, instead of sending alerts, we will block suspicious accounts immediately.</p><p>Sentinel actually caught the attack while it was happening (with a custom rule we had from previous attacks), but in the 60 minutes it took us to react, most of the harm was already done.</p><p>The last thing we decided was to make an official complaint with the Romanian Police. This attack was too targeted to just ignore!</p><p>Although some of the methods used seemed to be automated, the fact that they studied our organizational structure, and indentified key people that would be used in the attack, cannot go unpunished.</p><p>Also, the phone call that pressured our colleague, we hope will lead the police to the criminal behind this.</p><p>If you work in a mid-sized or large company, similar to ours, in the last 24 hours, at least once someone tried to hack your credentials, steal your data, get you to send them money, convince you to buy fraudulent services, send you money, use your computer for nefarious purposes… or many many other methods of hurting your company, your career or you personally.</p><p>Over the last 2 years we measured that these campaigns, almost doubled in number, are more targeted, use research and social engineering attempts and get more and more difficult to block.</p><p>Protective technology evolved a lot — and most of the attempts are actually caught before they reach our users. But, in the end, the only thing that really makes a difference is user education.</p><p>Wash your hands, look both sides when you cross the street and be very very very careful when you enter your corporate credentials.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff9e2a5ecbb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Approval in Microsoft Flow (PowerAutomate) Sucks]]></title>
            <link>https://danielkloyber.medium.com/approval-in-microsoft-flow-powerautomate-sucks-aa2718a4239d?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa2718a4239d</guid>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[powerapps]]></category>
            <category><![CDATA[office-365]]></category>
            <category><![CDATA[flow]]></category>
            <category><![CDATA[business-process-modeling]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Wed, 29 Jan 2020 12:33:31 GMT</pubDate>
            <atom:updated>2020-01-29T12:33:31.043Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pA3QttUhosQDmMYD" /><figcaption>Photo by <a href="https://unsplash.com/@bailey_i?utm_source=medium&amp;utm_medium=referral">Issy Bailey</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let me start with the conclusion:</p><p>Approvals are still are still the weak spot in Microsoft Flow / Power Automate.</p><p>The functionality is basic, does not cover real business needs, cannot be extended, and in general — sucks.</p><p>Features promised in 2017 are still pending — with no updates.</p><p>The Dynamics model used has absolutely no documentation, if you want to make your own automation you will depend on intuition and guess work.</p><p>My two cents: CDS is a poor choice for modelling this kind of features, and is currently blocking innovation and new functionalities.</p><p>Take this simple business scenario:</p><blockquote>“You need to model an approval process for invest requests. If the value is below a certain amount only the manager has to approve. If the value is above a certain amount, the skip manager has to approve as well.”</blockquote><p>Now lets try to model this with SharePoint and Flow (nee Power Automate).</p><p>We create a custom SharePoint list, with the appropriate fields.</p><p>New requests are added here.</p><p>For the logic we use a new flow, that triggers on item created. It first asks for approval from the direct manager, waits for the approval. It then checks for the value of the invest request, and decides if it needs to ask for approval from the skip level manager.</p><p>All fun till here — we basically modelled our process in less than 20 minutes and it seems to work as expected.</p><p>This might also be sufficient… if you work in a ten person organization (an one might ask himself if such an organization needs this process).</p><p>If you, like me, work on a mid-sized business with hundreds of office workers, around the globe, you need a couple more features:</p><p>1. The requests need to be visible only to the people that are part of the approval process.</p><ul><li>In Flow we have (for some time now) the possibility to give item level SharePoint permissions to users. This might do the trick — but, with one caveat, requests will be visible a couple of seconds to everyone.</li></ul><p>2. You need a place where every employee can see all the approval requests they were assigned.</p><ul><li>In theory we were able to achieve this using calls to dynamics back-end. the limitation here is that you have to do multiple queries to get the dynamics user id, then get the items, the filter them. Taking actions on the approval requests (like integrating approvals in your app) is not possible.</li><li>There is a feature request for this: <a href="https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Use-Graph-API-to-list-and-take-action-on-approvals/idi-p/62143">https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Use-Graph-API-to-list-and-take-action-on-approvals/idi-p/62143</a> but its idle for <strong>2.5 years</strong> now.</li></ul><p>3. You need an easy way to delegate approval tasks, when people leave the company or when they are out of office unexpectedly.</p><ul><li>This was impossible. We invested a couple of days in trying to modify the data using PowerApps, Flows, Dynamics — but to no avail.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*EKCTV6FSF7MI2NTWNB2xwA.png" /></figure><ul><li>There is a feature request for this (<a href="https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Approvals-v2-Delegate-approvals/idi-p/44402">https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Approvals-v2-Delegate-approvals/idi-p/44402</a>) but again, nothing happened for the last two years.</li><li>We got a PowerApp that would modify titles, and descriptions, but modifying the “assigned to” user, was not really possible.</li></ul><p>4. You need a stand-in system, so that you delegate tasks automatically when someone is on vacation.</p><ul><li>This is was another fail. We tried to implement a centralized system where the Flow’s check for user availability — but its not really an option. The complexity soon got out of hand, and we were not able to cover sufficient scenarios.</li></ul><p>5. Reminders need to be sent for over-due approvals.</p><ul><li>In theory we implemented this in the Flow logic — but it added a lot of complexity to the overall process.</li></ul><p>6. Reporting needs to be done on approvals to be able to enforce KPI’s.</p><ul><li>We were able to extract some basic data from Dynamics — process that data, and get some reporting. It’s not ideal, but it could work if we put some more effort into it.</li></ul><p>7. We can assign the task to a group, and then have different approval scenarios: everyone, majority, first to approve.</p><ul><li>Forget about this — we have the two scenarios: first to approve, all must approve. And that is it.</li></ul><p>Most of the missing features here — are requested for years now, without any updates coming out. Not even a timeline for the accepted requests.</p><p>I might have missed some solutions for the question raised here — and if so, please let me know — but I am rather sure its nothing obvious.</p><p>In my experience, this kind of simple, straightforward applications/automations are a big chunk of what people use Office 365 for.</p><p>I simply cannot understand why Microsoft did not put a little more effort into this stuff. I suspect it’s a limitation in the CDS (used as data layer) or an effort not to take Nintex off the market.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa2718a4239d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An unwanted holiday gift]]></title>
            <link>https://danielkloyber.medium.com/an-unwanted-holiday-gift-b04b3f0fe7f2?source=rss-ca068dfbaf3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b04b3f0fe7f2</guid>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[office-365]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[spfx]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Daniel Kloyber]]></dc:creator>
            <pubDate>Wed, 19 Dec 2018 21:51:04 GMT</pubDate>
            <atom:updated>2018-12-19T21:51:04.039Z</atom:updated>
            <content:encoded><![CDATA[<p>A couple of months ago, I tasked my young padawan, with the development of a new and shiny Office 365 tool for our internal compliance department.</p><p>Nothing out of the extraordinary, but a great chance to learn: a couple of SharePoint lists, a couple of SPFX webparts, some flows and all in good time for the holidays, where we make most use of it because of the strict gifting policies in our company.</p><p>Part of our strategy is to include telemetry in our applications — to get a headsup when something is failing but also to make it easier to troubleshoot.</p><p>This is how our dashboard showing the errors looked today:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BZJWDNf205hFm48r2Y0Jzw.png" /></figure><p>Here follows the story of how we got screwed by Microsoft (kinda), and also some details of the technical pickle I’m currently in.</p><p>As you can see in the graph, we had a few (very few) errors in our application over the past weeks, but nothing to really raise an alarm. And then… today the error counts exploded.</p><p>Of course, we almost immediately also got a couple of tickets complaining that the solution is not usable.</p><p>While checking our telemetry data, we noticed we have the same error over and over again:</p><blockquote>AADSTS50058: A silent sign-in request was sent but none of the currently signed in user(s) match the requested login hint.<br> Trace ID: 1b5347ac-8686–40fe-8389–660f54b81c00<br> Correlation ID: fec2121b-c16a-4d1d-8805–56f1ed19bd88<br> Timestamp: 2018–12–19 20:08:34Z</blockquote><p>Well… it seems that the problem is that we can no longer query the microsoft graph to get data from our users. For that purposes we used something that is called an MSGraphClient that handles authentication and management and a lot of stuff for us (included in pnpjs).</p><p>First step was to have a look at the traffic that was causing the error:</p><ul><li>we basically do a call to <a href="https://login.microsoftonline.com/">https://login.microsoftonline.com/</a> that among other parameters like tenantid and return address contains a query string parameter called login_hint that is actually my email.</li><li>this was the first hint at what is happening — since in our special case, the email is not equal with the UPN of the user, hence, we cannot really use the email in a login_hint.</li></ul><p>Second step was to find out how this actually came to be. So… I followed the codepath throught the following steps:</p><ul><li>this is where we actually set the login_hint parameter:</li></ul><blockquote>return e.convertTokenParametersToConfig = function (t) {<br>var r;<br>return t.userEmail &amp;&amp; !i._SPKillSwitch.isActivated(e.usePromptQueryParamKillSwitchGuid, “12/02/18”, “Use login hint to resolve ambiguous users failure”) &amp;&amp; (r = “login_hint=” + encodeURIComponent(t.userEmail)), { clientId: t.servicePrincipalId, redirectUri: t.redirectUri, instance: i.UrlUtilities.removeEndSlash(t.aadInstanceUrl) + “/”, loadFrameTimeout: 1e4, tenant: t.aadTenantId, navigateToLoginRequestUrl: !1, extraQueryParameter: r };</blockquote><ul><li>the value for the login_hint is set to t.userEmail</li><li>I then checked where the t variable comes from, and actually traced it back to the pagecontext.</li></ul><p>So, what exactly happened — well, in order to mitigate some problems with multiple microsoft accounts logged in on the same machine, someone decided to pass the user email as login_hint, so the authentication works smoothly and we get the correct identity.</p><p>Problem is, this happened under the wrong assumption that all the time the email will equal the UPN — and in our case it does not, so the login_hint is incorrect and results in an error.</p><p>All of this was rolled out a couple of days ago to our tenant, and since today the first authentication tokens started to expire, it bit us really really bad.</p><p>The fix is rather simple, since we have the UPN in the pagecontext — but hey, that changes needs to be done by Microsoft.</p><p>In other words, there is nothing I can really do to fix this, except some extremely ugly hacks that involce hacking into the pagecontext.</p><p>And this is just one part of the problem. The other problem is the scenario I inherited, where the Email and the UPN of the users are different. As far as I know the only solution for this would be to delete all users from Azure AD and then reconfigure the sync to have an alternative login. And this, of course, will cause all the data to be lost. Soooo… what to do?.. What to do?</p><p>Great Christmas Gift Microsoft!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*zOmMQZewJ8KH2xITGA1Kvw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b04b3f0fe7f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>