<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Kenneth's Journal</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/kennethteo/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/kennethteo/feed.xml</link>
    <description>A blog column to share my two cents, learning and sometimes, rant.</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:17:15 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>TfsMigrator ISVError:300005 Mapping MemberSid &gt; MemberId</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/isverror300005-mapping-membersid-memberid</link>
      <pubDate>Thu, 09 Aug 2018 16:40:42 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=575</guid>
      <description><![CDATA[Note and warning: This is a workaround and by no mean an official fix, use with care and make sure...]]></description>
      <content:encoded><![CDATA[<span style="color: #ff0000"><strong>Note and warning: This is a workaround and by no mean an official fix, use with care and make sure you backup your config database.</strong></span>

If you are using tfsmigrator you may have encountered this error <em>ISVError:300005 Unexpected non group identity was found to have direct membership to everyone group</em>, and according to official documentation https://docs.microsoft.com/en-us/vsts/articles/migration-troubleshooting you need to run

<code>DECLARE @p6 dbo.typ_GroupMembershipTable
INSERT into @p6 values('{GroupSid}','Microsoft.TeamFoundation.Identity','{MemberId}',0)
EXEC prc_UpdateGroupMembership @partitionId=1,@scopeId='{ScopeId}',@idempotent=1,@incremental=1,@insertInactiveUpdates=0,@updates=@p6,@eventAuthor='9EE20697-5343-43FC-8FC5-3D5D455D21C5',@updateGroupAudit=0</code>

You are supposed to populate the above t-sql with the parameters you get from the error tfsmigrator threw out:

<code>ISVError:300005 Unexpected non group identity was found to have direct membership to everyone group. GroupSid:S-1-9-1551374245-3746625149-2333054533-2458719197-2313548623-0-0-0-0-3, MemberId:76050ddf-4fd8-48c4-a1ff-859e44364519, ScopeId:7df650df-0f8b-4596-928d-13dd89e5f34f</code>

But instead of getting MemberId like all thing should be, you are getting, MemberSid:System.Security.Principal.WindowsIdentity;S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxxx-xxxxxx

What you do?
Note down the ScopeId and GroupSid from the original tfsmigrator error and perform the following t-sql

#1 <code>SELECT DisplayName from tbl_Group where Sid = '{GroupSid}'</code>
This should get you the offending tfs group

#2 <code>SELECT Name from tbl_GroupScope where ScopeId = '{ScopeId}'</code>
This should give you the project name (I think) at least according to this doc https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2013/ff731995(v=vs.120)

Go to project tfs web portal (from #2) tfs&gt;admin&gt;security find tfs group from #1 and look for any suspicious member (hopefully not a lot, <strong>anything that is non TFS group identity, such as an AD group or user identity&lt;from <a href="https://docs.microsoft.com/en-us/vsts/articles/migration-troubleshooting">here</a></strong>) and find the accountname

#3 <code>SELECT Id from tbl_Identity where AccountName = '{AccountName}'</code>
You should get the membereid, I HOPE.

Powered with this memberid from #3 you can proceed to re-run the command as suggested https://docs.microsoft.com/en-us/vsts/articles/migration-troubleshooting
<code>DECLARE @p6 dbo.typ_GroupMembershipTable
INSERT into @p6 values('S-1-9-1551374245-3746625149-2333054533-2458719197-2313548623-0-0-0-0-3','Microsoft.TeamFoundation.Identity','76050ddf-4fd8-48c4-a1ff-859e44364519',0)
EXEC prc_UpdateGroupMembership @partitionId=1,@scopeId='7df650df-0f8b-4596-928d-13dd89e5f34f',@idempotent=1,@incremental=1,@insertInactiveUpdates=0,@updates=@p6,@eventAuthor='9EE20697-5343-43FC-8FC5-3D5D455D21C5',@updateGroupAudit=0</code>]]></content:encoded>
    </item>
    <item>
      <title>Azure Kubernetes Service (AKS) with Azure AD</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/aks-with-aad</link>
      <pubDate>Thu, 26 Jul 2018 14:04:32 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=545</guid>
      <description><![CDATA[Main article is over here, and do check them out from time to time because things change very...]]></description>
      <content:encoded><![CDATA[Main article is over <a href="https://docs.microsoft.com/en-us/azure/aks/aad-integration">here</a>, and do check them out from time to time because things change very freuqently.

After reading the article above, I thought I could (maybe) everyone a favor by explaining a little bit more in details (and in layman terms ala Explain like I'm Five eli5) on what is going on. Here's my attempt:

In Azure, you get to add users and groups to resources and resource groups, delegating permission and grant them access as needed. Wouldn't it be great if you can just add your colleague within your Azure AD tenant to AKS so you get to control what access they have and they get to sign-in with their usual corporate credentials? This is exactly what AKS allows you to do today.

Here's what you need:
<ol>
 	<li>An Azure Subscription (you can get it for free for a year thorugh my.visualstudio.com)</li>
 	<li>Azure Kubernetes Services (AKS) - You will find a lot of references on how to create this but I suggest you to follow this <a href="https://docs.microsoft.com/en-us/azure/aks/aad-integration">guide</a></li>
 	<li>Azure CLI, with AZ AKS installed (I like to do everything locally, but you can work with cloud shell as well)</li>
</ol>
Once you have you AKS ready run the following command:
<ol>
 	<li><code>az login</code> and follow on screen instruction</li>
 	<li><code>az aks get-credentials --resource-group k8s --name k8s --admin</code>
Basically, what the above does is to get credential from your Kubernetes cluster and store them in C:\Users\[username]\.kube\config so kubectl can use them later.</li>
 	<li><code>az aks browse --resource-group k8s --name k8s</code>
You can then open up the Kubernetes Dashboard by running above command. This will create a tunnel, and open up your browser to Kubernetes cluster's dashboard. (not very imporatant, but good to know)</li>
</ol>
you are now seeing the dashboard using the credential stored in .kube\config (for me it it was clusterAdmin_k8s_k8s) Depends on what version of Kubernetes you are running, if you see the following error, that's because AKS (the latest one as of the time of this blog's entry) has RBAC enabled by default and there is an extra step you need to do.

[caption id="attachment_555" align="alignnone" width="1024"]<a href="https://msdnshared.blob.core.windows.net/media/2018/07/error-k8s.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/error-k8s-1024x262.png" alt="" class="wp-image-555 size-large" width="1024" height="262" /></a> basically the first error is telling you the service account (kubernetes-dashboard) you are using to view the k8s dashboard at namespace (kube-system) has no permission to do what is needed (to view configmaps) - configmaps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list configmaps in the namespace "default"[/caption]

Run this <code>kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard</code> We are creating a "clusterrolebinding" name it as "kubernetes-dashboard" with "cluster-admin" as the permission level and grant this to the service account "kubernetes-dashboard" at "kube-system" namespace. Now refresh.
<h1>RBAC Binding</h1>
To add a Azure AD user, create a .yaml file with following contents
<code>apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: contoso-cluster-admins
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: "[username]@contoso.onmicrosoft.com"</code>
run this <code>kubectl apply -f "[path to .yaml]"</code>

you can then run <code>kubectl get namespaces --as=[username]@contoso.onmicrosoft.com</code> to verify <a href="https://msdnshared.blob.core.windows.net/media/2018/07/n.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/n-300x77.png" alt="" class="alignnone size-medium wp-image-565" width="300" height="77" /></a>

We were doing all the above through "local user account --admin", if you may. What we are going to do next is to login and run kubectl using Azure AD user.
Remove all the context in .kube\config by running <code>kubectl config unset contexts.k8s</code> <code>kubectl config unset clusters.k8s</code> <code>kubectl config unset users.clusterUser_k8s_k8s</code> or you can delete .kube\config just to be safe

<code>az aks get-credentials --resource-group k8s--name k8s</code>
<code>kubectl get nodes</code>
You will be asked to sign-in again, and you can use the azure ad account you just added to sign-in.

I haven't test the following scenario yet, but if I am correct you now can add any developers as reader to the Azure Resource Group as reader (so they can run az aks get-credentials) and then grant them permission separately within Kubernetes cluster using RBAC-Binding

I hope my attempt in eli5 was good enough.]]></content:encoded>
    </item>
    <item>
      <title>Analyzing W3C IIS Log with PowerBI</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/analyzing-w3ciis-log-with-powerbi</link>
      <pubDate>Fri, 27 Apr 2018 17:19:22 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=425</guid>
      <description><![CDATA[IIS and HTTP.sys logs contain incredible source of information to help in identifying potential...]]></description>
      <content:encoded><![CDATA[IIS and HTTP.sys logs contain incredible source of information to help in identifying potential issues.

When I first started troubleshooting IIS/Websites issues, LogParser (and LogParser Studio) was my go to tool - writing queries to find information, or generate charts to impress people.

I have been using PowerBI for quite sometime and it never occurred to me to use it as a tool for log analysis. In this post, I will explain on how to transform raw W3C Extended Log File Format into CSV, and then import it to PowerBI.

Tools needed:
<ol>
 	<li><a href="https://www.microsoft.com/en-my/download/details.aspx?id=24659">Log Parser</a> (free!)</li>
 	<li><a href="https://powerbi.microsoft.com/en-us/desktop/">PowerBI Desktop</a> (free!)</li>
</ol>
<h1>Transforming W3C IIS Logs to CSV</h1>
You most likely have over hundreds of log to be analyzed, I wrote a script to help in converting them into CSV. In my most recent customer, they have 500 logs, over period of just one year.
<ol>
 	<li>Make sure you have logparser installed, and note down the install location. I wrote a small batch file to convert W3C IIS logs to CSV using logparser. You can get the .bat <a href="https://github.com/knethteo/Analyzing-W3C-IIS-Log-with-PowerBI">here</a>, make sure to modify the script to include your logs location, and logparser.exe location.</li>
 	<li>Run the script, and the converted .CSV will be placed in the same folder as your logs.

[caption id="attachment_435" align="alignleft" width="1024"]<a href="https://msdnshared.blob.core.windows.net/media/2018/04/ps.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/04/ps-1024x610.png" alt="" class="size-large wp-image-435" width="1024" height="610" /></a> Converting W3C IIS Logs into CSVs[/caption]</li>
</ol>
<h1>Import Converted .CSVs into PowerBI</h1>
<ol>
 	<li>Open Power BI
<a href="https://msdnshared.blob.core.windows.net/media/2018/04/Open-PowerBI.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/04/Open-PowerBI-300x182.png" alt="" class="alignnone wp-image-465 size-medium" width="300" height="182" /></a></li>
 	<li>Choose Get File and select the folder where your converted CSV Logs reside, click OK
<a href="https://msdnshared.blob.core.windows.net/media/2018/04/Get-Data.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/04/Get-Data-278x300.png" alt="" class="alignnone size-medium wp-image-455" width="278" height="300" /></a></li>
 	<li>You will notice that it is importing the file's binary (column 1) and its metadata (rest of columns). We don't want the metadata, we want the binary within these files. Click Edit.
<a href="https://msdnshared.blob.core.windows.net/media/2018/04/Import-CSV.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/04/Import-CSV-300x227.png" alt="" class="alignnone size-medium wp-image-475" width="300" height="227" /></a></li>
 	<li>In the Query Editor, remove all the other columns except the one contains the binary data.
<a href="https://msdnshared.blob.core.windows.net/media/2018/04/Query-Editor.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/04/Query-Editor-300x169.png" alt="" class="alignnone wp-image-495 size-medium" width="300" height="169" /></a></li>
 	<li>Once you remove the rest of the columns, click on the button (next to Content, with two downward arrows) as shown below to expand the binary data
<a href="https://msdnshared.blob.core.windows.net/media/2018/04/Query-Editor-2.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/04/Query-Editor-2-300x254.png" alt="" class="alignnone wp-image-485 size-medium" width="300" height="254" /></a></li>
 	<li>Once expanded, in the Query Editor, click "Close and Apply"
<a href="https://msdnshared.blob.core.windows.net/media/2018/04/Query-Editor-Close-and-APply.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/04/Query-Editor-Close-and-APply-300x154.png" alt="" class="alignnone wp-image-505 size-medium" width="300" height="154" /></a></li>
 	<li>Wait for a few minutes, and you should see the "report" windows.
<a href="https://msdnshared.blob.core.windows.net/media/2018/04/Report.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/04/Report-300x162.png" alt="" class="alignnone wp-image-515 size-medium" width="300" height="162" /></a></li>
 	<li>You can then build any report or charts you like based on the CSV you have imported. The example I have shows table with highest average return time, sc-status, etc.
<a href="https://msdnshared.blob.core.windows.net/media/2018/04/dashboard.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/04/dashboard-300x162.png" alt="" class="alignnone wp-image-525 size-medium" width="300" height="162" /></a></li>
</ol>
A sample of the PowerBI Model (.pbix) used in this blog can be downloaded from my <a href="https://github.com/knethteo/Analyzing-W3C-IIS-Log-with-PowerBI">GitHub repository</a>

Happy charting.]]></content:encoded>
    </item>
    <item>
      <title>Azure App Service - Options Method (and other HTTPS Verb) disabled / not working in Azure Web App</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/azure-app-service-options-method-and-other-https-verb-disabled-not-working-in-azure-web-app</link>
      <pubDate>Sat, 17 Mar 2018 15:57:43 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=375</guid>
      <description><![CDATA[A customer deployed a SignalR API to WebApp. For this particular customer their environment is...]]></description>
      <content:encoded><![CDATA[A customer deployed a SignalR API to WebApp. For this particular customer their environment is hosted on Azure App Service using App Service Environment v2. That said, I have reproduced the following behavior on the regular Windows-IIS based Azure Web App.

This SignalR API worked great on local machine, local dev server, and even Azure VM. However when deployed to Azure Web App, one of the API URIs wasn't responding as it should, as developer depends on some return parameters through HTTP Options method, we need to make this work.

When working as intended, using Postman, we should be seeing the following respond

[caption id="attachment_405" align="aligncenter" width="1024"]<a href="https://msdnshared.blob.core.windows.net/media/2018/03/pm-success1.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/03/pm-success1-1024x412.png" alt="" class="wp-image-405 size-large" width="1024" height="412" /></a> What success should look like. This was hosted on a Windows 2012 R2 VM's IIS[/caption]

Note that in the example above we are calling the <strong>Http verb - Options</strong>, basically exposing to the clients what options are available from the service; in this case "WebSockets", "ServerSentEvents", and "LongPolling".

As the application was uploaded to Azure App Service as an API, calling it from Postman, gave us this error message: "<em>the resource you are looking for has been removed, had its name changed, or is temporarily unavailable - HTTP 401</em>". Since this is not 404 error, we are quite sure the resource we are looking for is there, but not responding to our HTTP request.

After some digging around, it turns out that on Azure Web App, <strong>Options method is being disabled by default</strong>. We eventually added the following lines in one of our Web.config files to allow it.
<pre><code>&lt;configuration&gt;
 &lt;system.webServer
  &lt;security&gt;
   &lt;requestFiltering&gt;
    &lt;verbs allowUnlisted="true"&gt;
     &lt;add verb="OPTIONS" allowed="true" /&gt;
    &lt;/verbs&gt;
   &lt;/requestFiltering&gt;
  &lt;/security&gt;
 &lt;/system.webServer&gt;
&lt;/configuration&gt;</code></pre>
<strong><em>Unfortunately, I wasn't able to find any official documentation on this behavior, and if you do please let me know at the comment section!</em></strong>]]></content:encoded>
    </item>
    <item>
      <title>Finding QnAKnowledgebaseId and QnASubscriptionKey to configure the new Azure Bot Service</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/finding-qnaknowledgebaseid-and-qnasubscriptionkey-to-configure-the-new-azure-bot-service</link>
      <pubDate>Wed, 24 Jan 2018 20:12:11 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=335</guid>
      <description><![CDATA[Bot Service went through an overhaul again; the configuration to connect your Bot Service to...]]></description>
      <content:encoded><![CDATA[Bot Service went through an overhaul again; the configuration to connect your Bot Service to QnAMaker is different now. I am not sure for how long the information here will stay relevant but it is how you configure your Azure Bot Service to talk to QnAMaker.ai at the time of writing this post.

When you use the new Bot Service template in Azure to deploy your QnAMaker bot, there are 2 settings you need to configure in App Settings - QnAKnowledgebaseId QnASubscriptionKey.<a href="https://msdnshared.blob.core.windows.net/media/2018/01/QnAMaker-Bot-Service.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/01/QnAMaker-Bot-Service-1024x600.png" alt="" class="aligncenter size-large wp-image-345" width="1024" height="600" /></a>

Here's where you can find them:

Go to https://qnamaker.ai/Home/MyServices click on your bot's "View Code"

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/QnAMaker-Settings.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/01/QnAMaker-Settings-1024x595.png" alt="" class="aligncenter size-large wp-image-355" width="1024" height="595" /></a>The first string right after "knowledgebases" is your QnAKnowledgebaseId, whereas the one right after Ocp-Apim-Subscription-Key is your QnASubscriptionKey

&nbsp;

Hope that helps.]]></content:encoded>
    </item>
    <item>
      <title>Quick Guide on Importing Data from SQL Server (or SQL Azure) to Cosmos DB</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/quick-guide-on-importing-data-from-sql-server-or-sql-azure-to-cosmos-db</link>
      <pubDate>Tue, 16 Jan 2018 21:52:19 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=315</guid>
      <description><![CDATA[Sample code here: https://github.com/knethteo/SQLAzuretoCosmosDB

This sample does the...]]></description>
      <content:encoded><![CDATA[Sample code here: https://github.com/knethteo/SQLAzuretoCosmosDB

This sample does the following:
<ol>
 	<li><span class="css-truncate css-truncate-target"><a href="https://github.com/knethteo/SQLAzuretoCosmosDB/blob/master/CosmosDB/Create%20SQL%20DB%20Table.txt" id="e146f93908570653637234de1d574360-d5f71b1c8bd88ad593958002cacacca9bb539f97" class="js-navigation-open" title="Create SQL DB Table.txt">Create SQL DB Table.txt</a></span> That will create the initial database in SQL Server or SQL Azure</li>
 	<li>The main Program will read the database, parse the data and store them in Cosmos DB</li>
</ol>
Before you start the program, you will have to do step 1, and edit the app.config:
<ul>
 	<li>endpoint: Your cosmosDB endpoint</li>
 	<li><span class="pl-s"><span class="pl-pds"></span>primaryKey: Your cosmosDB primary key, you can get this from your Azure Portal's CosmosDB blade<span class="pl-pds"></span></span></li>
 	<li><span class="pl-s"><span class="pl-pds"></span>connectionString: The connection string to the SQL Database where your original data resides. In the sample App.config, this is referenced to SQL Azure, Microsoft Azure SQL DB<span class="pl-pds"></span></span></li>
 	<li><span class="pl-s"><span class="pl-pds"></span>database<span class="pl-pds"></span></span>: database name in your CosmosDB</li>
 	<li><span class="pl-s"><span class="pl-pds"></span>collection<span class="pl-pds"></span></span>: Collection name of the CosmosDB database</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Enable "Analyze" tab in Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/enable-analyze-tab-in-visual-studio</link>
      <pubDate>Sat, 25 Nov 2017 13:48:41 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=276</guid>
      <description><![CDATA[If you have installed Visual Studio using Visual Studio Installer, most likely you didn't include...]]></description>
      <content:encoded><![CDATA[If you have installed Visual Studio using Visual Studio Installer, most likely you didn't include "Analyze" capability. This because it is something that you will have to add explicitly in the "Individual components" and they are not part of the typical "workloads" that you may have chosen.<a href="https://msdnshared.blob.core.windows.net/media/2017/11/Capture51.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/11/Capture51-1024x229.png" alt="" class="aligncenter size-large wp-image-306" width="1024" height="229" /></a>

Fortunately, Microsoft made it easier to add (or remove) extra features retroactively with ease. If you are missing Analyze tab in your Visual Studio, just follow the following steps:<a href="https://msdnshared.blob.core.windows.net/media/2017/11/Capture21.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/11/Capture21-1024x314.png" alt="" class="alignnone wp-image-286 size-large" width="1024" height="314" /></a>
<ol>
 	<li>Open Visual Studio (I am on Visual Studio 2017), you can download VS2017 <a href="https://www.visualstudio.com/downloads/">here</a></li>
 	<li>Open up Visual Studio Installer, the easiest way to open the installer is to go File&gt;New&gt;Project, in the New Project window, click Open Visual Studio Installer.<a href="https://msdnshared.blob.core.windows.net/media/2017/11/Capture31.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/11/Capture31-1024x556.png" alt="" class="aligncenter wp-image-296 size-large" width="1024" height="556" /></a></li>
 	<li>Click on "Individual components" tab, check on "Code Clone", "Code Map", "Developer Analytics Tool", "Live Dependency Validation" and on the right summary panel, check "Architecture and analysis tools"<a href="https://msdnshared.blob.core.windows.net/media/2017/11/Capture41.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/11/Capture41-1024x572.png" alt="" class="alignnone size-large wp-image-305" width="1024" height="572" /></a></li>
</ol>
That's it, you can now do code clone and other type of analysis, including Static Code Analysis using some of the built-in rule sets.

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Deleting Azure AD Tenant - Unable to delete all Enterprise Applications</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/deleting-azure-ad-tenant</link>
      <pubDate>Tue, 19 Sep 2017 19:27:08 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=195</guid>
      <description><![CDATA[Hi All,






This is a quick guide on deleting an Azure AD Tenant, especially when there is...]]></description>
      <content:encoded><![CDATA[<!-- [if lt IE 9]&gt;-->Hi All,
<div class="site container-fluid" id="page">
<div class="site-content row" id="site-content">
<div class="content-area col-sm-9" id="primary">
<div class="div-content" id="single-content"><article class="post-784 post type-post status-publish format-standard hentry category-uncategorized" id="post-784">
<div class="entry-content single">

This is a quick guide on deleting an Azure AD Tenant, especially when there is some stubborn enterprise applications that refuse to go away.

Few weeks ago, I was trying to delete an Azure AD that I created as a test account for my customer. I happily go to portal.azure.com, changed to the relevant directory, in this case it was ronelx.onmicrosoft.com, and try to delete it using the "delete" button. Unfortunately, it came to a pause when Azure AD complaints that I have an enterprise application that needed to be removed. Normally you can click on the button "Delete all enterprise applications" as shown in the screenshot and you can delete them manually:

<a href="https://msdnshared.blob.core.windows.net/media/2017/09/Capture11.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/09/Capture11-300x228.png" alt="" class="alignnone size-medium wp-image-205" width="300" height="228" /></a>

</div>
<div class="entry-content single"></div>
<div class="entry-content single">However, as you can see from the following screenshot, when I try to delete, it refuses to go away with the "delete" button greyed out.</div>
<div class="entry-content single"><a href="https://msdnshared.blob.core.windows.net/media/2017/09/Capture21.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/09/Capture21-300x183.png" alt="" class="alignnone size-medium wp-image-206" width="300" height="183" /></a></div>
<div class="entry-content single">WHAT DO WE DO?! First of all, you will need to create a new Global Admin OrgID (Work or School account) in the directory you are trying to delete (assuming you have removed all your users, as this is the first thing Azure AD checks for as shown above when you try to delete Azure AD tenant). Make sure you copy the temporary password:
<a href="https://msdnshared.blob.core.windows.net/media/2017/09/Create-User.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/09/Create-User-282x300.png" alt="" class="alignnone size-medium wp-image-215" width="282" height="300" /></a>Go to https://www.powershellgallery.com/packages/AzureAD/ to get the latest powershell Azure AD module</div>
<div class="entry-content single">Start Powershell and run:</div>
<div class="entry-content single"><code>Install-Module -Name AzureAD
</code></div>
<div class="entry-content single">

<a href="https://msdnshared.blob.core.windows.net/media/2017/09/AAD.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/09/AAD-300x222.png" alt="" class="size-medium wp-image-236" width="300" height="222" /></a>

</div>
<div class="entry-content single"><code></code>Once done run</div>
<div class="entry-content single"><code>Connect-AzureAD
</code></div>
<div class="entry-content single">You will be prompted to login, login with the user you created and will be asked to change your password:</div>
<div class="entry-content single"><a href="https://msdnshared.blob.core.windows.net/media/2017/09/aad3.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/09/aad3-266x300.png" alt="" class="alignnone size-medium wp-image-225" width="266" height="300" /></a></div>
<div class="entry-content single"><code></code>You should now be able to list all the current application SPs in a directory:</div>
<div class="entry-content single"><span style="font-family: Consolas">Get-AzureADServicePrincipal</span></div>
<div class="entry-content single"><span style="font-family: Consolas"><img src="https://msdnshared.blob.core.windows.net/media/2017/09/aad4-300x126.png" alt="" class="alignnone wp-image-235" width="300" height="126" /></span></div>
<div class="entry-content single">Now, delete all non-required apps in the tenant directory, for me it was the Microsoft Visual Studio Team Services.
<span style="font-family: Consolas">Remove-AzureADServicePrincipal -objectid [enter object id here]</span>Now that you are done, you will have to delete your user in AAD first, before deleting the Directory, or you will get a message saying you cannot delete the directory, because you have one or more users.</div>
<div class="entry-content single">Try deleting the Azure AD again, and this time it should pass all the checks:</div>
<div class="entry-content single">

<a href="https://msdnshared.blob.core.windows.net/media/2017/09/delete-ronelx.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/09/delete-ronelx-255x300.png" alt="" class="alignnone size-medium wp-image-245" width="255" height="300" /></a><a href="https://msdnshared.blob.core.windows.net/media/2017/09/Success.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/09/Success-252x300.png" alt="" class="alignnone size-medium wp-image-247" width="252" height="300" /></a><br class="entry-content single" />Hope this helps.

</div>
Reference: https://blogs.msdn.microsoft.com/ericgolpe/2015/04/30/walkthrough-of-deleting-an-azure-ad-tenant/ (this blog was written in 2015, I have updated some powershell scripts, as you can now install powershell modules through PowerShell Gallery)

</article></div>
</div>
</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>[Event] Distributor and Partner Azure Enablement - January 2017</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/event-distributor-azure-enablement-january-2017</link>
      <pubDate>Tue, 17 Jan 2017 17:45:49 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=185</guid>
      <description><![CDATA[Thanks for attending the Distributor and Partner Azure Enablement event. I hope everyone finds the...]]></description>
      <content:encoded><![CDATA[Thanks for attending the Distributor and Partner Azure Enablement event. I hope everyone finds the session useful. As promised, here are some links and questions I collected from the session.

Do also checkout https://azure.microsoft.com/en-us/community/events/ for any upcoming events.

Q&amp;A:

Q1: How about scenario where my data need to remain within country. Can I still use Azure to deploy my services?

A1: Assuming customer is sure that data sovereignty is important, the best thing we could do is to propose Hybrid solutions.

Q2: For virtual machines in the cloud, how does azure handle my backup

Q2: If your VM is already in Azure, you can use Azure Backup to backup the machines in scheduled basis. You can also use Azure Site Recovery to achieve disaster recovery for VMs in Azure or other cloud service provider.

Links:
<p style="margin: 0in;margin-bottom: .0001pt">TCO Calculator</p>
<p style="margin-top: 0in"><a href="https://tco.microsoft.com">https://tco.microsoft.com</a></p>
<p style="margin: 0in;margin-bottom: .0001pt">Azure AWS Service Mapping</p>
<p style="margin: 0in;margin-bottom: .0001pt"><a href="https://docs.microsoft.com/en-us/azure/guidance/guidance-azure-for-aws-professionals-service-map">https://docs.microsoft.com/en-us/azure/guidance/guidance-azure-for-aws-professionals-service-map</a></p>
<p style="margin: 0in;margin-bottom: .0001pt">[slides coming soon]</p>]]></content:encoded>
    </item>
    <item>
      <title>Separating Tags in Azure Usage Details using *free* Power BI Desktop for Better Data Visualization</title>
      <link>https://docs.microsoft.com/archive/blogs/kennethteo/separating-tags-in-azure-using-free-power-bi-desktop-for-better-data-visualization</link>
      <pubDate>Thu, 15 Sep 2016 11:04:33 GMT</pubDate>
      <dc:creator><![CDATA[knethteo]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kennethteo/?p=25</guid>
      <description><![CDATA[The Problem

Azure supports tagging of resources for the longest time; However, one of the...]]></description>
      <content:encoded><![CDATA[<strong>The Problem</strong>

Azure supports <a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-using-tags">tagging</a> of resources for the longest time; However, one of the complaints I have with this feature is: there is no easy way to separate them into their own column when exporting the usage details (see exhibit 1).

Tagging can be done at resource group or individual resource. The purpose of tags is loosely defined. Most often than not, an organization uses it to tag for cross-charge purposes.

[caption id="" align="alignnone" width="505"]<img src="https://msdnshared.blob.core.windows.net/images/excel-usagedetails-tags.jpg" width="505" height="196" /> Notice that the Tags column is very messy/unorganized when you have multiple tags.[/caption]

<strong>The Solution</strong>

If you have worked with JSON on a project or dueled with it extensively, you may have noticed the Tags column in the screenshot above is actually in JSON format.

Enter the Powerful <em>Power BI Desktop</em>...

I am not going to write a long-a** essay to tell you what's <a href="https://powerbi.microsoft.com/en-us/">Power BI</a>, you will be able to find online articles written by experts with better ability to explain it than I am. I'll leave you with this though: Power BI is an online service that transforms your data into rich visuals [blah blah blah].

Power BI also has a <strong>free</strong> for download <a href="https://powerbi.microsoft.com/en-us/desktop/">desktop client</a>, go ahead download and install it, I'll wait.
<ol>
 	<li style="list-style-type: none">
<ol>
 	<li style="list-style-type: none">
<ol>
 	<li>Launch Power BI Desktop</li>
 	<li>Import the usage data, either download from account.windowsazure.com or ea.azure.com and click “edit” in the import wizard (<strong></strong>and since I am such a good person, I have attached a sample usage data at the end of this guide for your convenience)

[caption id="" align="alignnone" width="634"]<img src="https://msdnshared.blob.core.windows.net/images/powerbi-tagscolumnclicked.jpg" width="634" height="264" /> Select the Tags column to separate them into their own column[/caption]
<ol>
 	<li>Select Tags column</li>
 	<li>Click on <em>Transform</em></li>
 	<li>Click on <em>Parse</em></li>
</ol>
</li>
 	<li>Once you have parsed it, click on the small <em>expand</em> icon at the corner in the top cell, like below

[caption id="" align="alignnone" width="465"]<img src="https://msdnshared.blob.core.windows.net/images/powerbi-tagsexpand.jpg" width="465" height="260" /> Expand it[/caption]
<ol>
 	<li>Click on the expand button</li>
</ol>
[caption id="" align="alignnone" width="936"]<img src="https://msdnshared.blob.core.windows.net/images/powerbi-tagsexpanded.jpg" width="936" height="327" /> Tags separated into their own respective columns[/caption]</li>
 	<li>That's it!</li>
</ol>
</li>
</ol>
</li>
</ol>
If you have any questions, feel free to comment below.

<strong>[Appendix]</strong>
<ul>
 	<li>The sample usage details file: https://1drv.ms/x/s!AthVHX51HSt1n9UXaFIiywn2SDtsvw</li>
</ul>
<strong>[Disclaimer]</strong>

<em>The information in this weblog is provided “AS IS” with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the author’s discretion. All code samples are provided “AS IS” without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The inclusion of any link does not imply endorsement by Microsoft of the linked site.</em>]]></content:encoded>
    </item>
  </channel>
</rss>