normalian blog

I will introduce about Microsoft Azure, ASP.NET or Java EE

Quick introduction for portal sites of Microsoft Azure

Do you know how many portal sites Microsoft Azure has? Almost all users access only "Microsoft Azure Portal". "Microsoft Azure Portal" manages all Azure resources such like VMs, App Service, SQL Database and others. In addition the portal site, Microsoft Azure also offers two other different portal sites as "Enterprise Azure Portal" and "Azure Account Portal".

  • "Enterprise Azure Portal" manages Azure subscriptions, subscription administrators and billing reports. This portal is mainly used by billing administrator in your company.
  • "Azure Account Portal" manages all Azure resources. This portal is mainly used by developers.
  • "Microsoft Azure Portal" is mainly used for create, transfer, cancel subscriptions. This portal is mainly used by developers.


You don't need to use "Enterprise Azure Portal" if there are no EA contract with Microsoft in your company. Almost all users who use only "Pay-As-You-Go" Azure subscriptions need to use only "Azure Account Portal" and "Microsoft Azure Portal".

Enable to access Azure subscriptions across Azure AD tenants

All Azure subscriptions are associated to an Azure AD tenant. As you know, you can use some different Azure AD tenants like below. This sometimes causes some issues, but you can learn how to use these features properly though this post.
Azure AD also manages your "School or Work Account" in your organization. You have to choose account type whether "School or Work Account" or "Microsoft Account"/"Personal Account" when you login Azure. This account types can express simply like below.

  • "Microsoft Account" and "Personal Account" are technically same, and they are managed by Microsoft services. They were called "LIVE ID" in past.
  • "School or Work Account" is managed by your own Azure AD tenant such like "", and you can assign custom domain name for your tenant as "" and others.

As far as I have tried, it's easy to access subscriptions across Azure AD tenants using "Microsoft Account". But almost all companies use "School or Work Account" for governance perspective. Because "Microsoft Account"s are managed by Microsoft, so it's difficult to enable or disable their accounts immediately.
It's needed to invite other Azure AD tenant users into your Azure AD tenant when you want to grant other Azure AD tenant users to access your subscriptions associated with your Azure AD tenant.

How to enable to access subscriptions from other Azure AD tenant users

There are two steps to grant your subscriptions to other Azure AD tenant users.

  1. Invite the users into your Azure AD tenant
  2. Assign IAM roles

Invite the users into your Azure AD tenant

Refer Inviting Microsoft Account users to your Azure AD-secured VSTS tenant | siliconvalve or follow below steps.

  1. Login to
  2. Login with your Global Admin credentials of your AD tenant
  3. Go to Azure Active Directory option on the blade
  4. In the next blade you will find an option of “user setting”
  5. Under “User setting” kindly check the option “admin and users in guest inviter role can invite”
  6. The option “admin and users in guest inviter role can invite” should be yes
  7. After that, go to users and groups in the same blade and click on “all users”
  8. Under all users, you will see the option “New guest user”
  9. After clicking on that, you can invite the user of other AD tenants.
  10. Once the user will accept the invitation, you can give access to the resource under the subscription of your AD tenant.

How to change AAD tenant associated to your subscriptions

You have already known how to create your own AAD tenant, but it sometimes causes some issues. As you know, all Azure subscriptions should be associated to an AAD tenant. You should change the AAD tenant of your subscriptions when you create new AAD tenant. You can learn how to change AAD tenant associated to your subscriptions in this post.

Step by step how to change AAD tenant in Azure portal

Choose your subscription need to change AAD tenant and click "Change directory" button like below.

Choose your new AAD tenant should be associated your subscription.

You can check its completion with portal notification like below, but it needed a few minutes to reflect into portal in my case. Please wait without hurry.

How to create your own Azure Active Directory tenant

You sometimes want to create own tenant when you try to use Azure AD authentication or "School or Work Accounts" independently with your organization Azure AD tenant. Especially, you will really want to create it when you will be in charge of some PoC using Microsoft Azure. You can learn how to create your own Azure Active Directory tenant in this post.

Step by step to create new tenant in Azure portal

Please click "+ New" button in left side of Azure portal and input "Azure Active Directory" like below.

You can find "Azure Active Directory" by Microsoft like below, and please click "Create" button.

Input your organization name and domain name, equal "tenant name", and choose your region.

After a few minutes later, you can find your new tenant from upper-right like below.

How to deploy your Azure Functions with VSTS when your project has multiple solutions

This article introduces how to deploy your Azure Functions with VSTS when your projects have multiple solutions like below. Please refer GitHub - AzureFunctions-CSharp-Sample if you need Azure Functions sample.


How to setup this build process

Open "Build and Release" tab in your VSTS project, and click "+New" button like below.

Choose "ASP.NET Core (.NET Framework)" template like below.

After creating a process, choose"Hosted VS2017" as "Agent queue". You will get error when you run this process if you choose other Agents.

Choose your Azure Functions solution to deploy like below.

Add "Azure App Service Deploy" task like below.

After adding the task, choose your Azure Functions and change "Package or folder" from "$(System.DefaultWorkingDirectory)/**/*.zip" to "$(build.artifactstagingdirectory)/**/*.zip".


I got below error when I chose "Hosted" as "Agent queue", because the process failed to build my application. The cause was MSBuild didn't support Azure Functions application right now.

Got connection details for Azure App Service:'xxxxfunctionapp'

Error: No package found with specified pattern

How to create Hive tables via Ambari on Microsoft Azure HDInsight

As you know, HDInsight is powerful service to analyze, manage and process BigData on Microsoft Azure. You can create Hadoop, Storm, Spark and other clusters pretty easily! In this article, I will introduce how to create Hive tables via Ambari with cvs files stored in Azure Storage.
At first, you have to create your HDInsight cluster associated an Azure Storage account. In this article, I create a Spark 2.1.x cluster as HDInsight cluster.

Store CSV files into your Azure Storage

Upload your CSV files into the Azure Storage account. In this article, I upload Nikkei Average CSV file like below.


It's stored into Azure Storage account associated with HDInsight cluster, and its path is described as "https://"storage-account-name"."spark-container-name"". You can specify the path in Hive query as "wasb://"spark-container-name"@"storage-account-name"".

Create Hive tables from your CSV files

Open and choose your HDInsight cluster. You can open Ambari portal to click a link of "https://'your-cluster-name'" in "Overview" page. Next, click "Hive View 2.0" button like below.

Now, you can execute Hive query using below portal site.
Copy below query and execute it into the site.

) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' lines terminated by '\n'
STORED AS TEXTFILE LOCATION 'wasb://"spark-container-name"@"storage-account-name"';

LOAD DATA INPATH 'wasb://"spark-container-name"@"storage-account-name"' INTO TABLE DEFAULT.NIKKEIAVERAGE_TABLE;

Check your query result

After executing your query, run below query to check the data in Ambari.


So, you can get below result.

ロサンゼルス生活日誌 ~その4 米国でのインターネット開通~

ご無沙汰してますがこんにちは。実は私が一番苦労した米国でのインターネット開設の流れを紹介したいと思います。日本だったりすれば KDDI か NTT 東西 辺りに頼めば大きな問題になることはないイメージですが、米国では相当の企業がどこかを知らなかったのが大きな敗因でした。この辺の苦労と米国特有の板挟みの経由を紹介したいと思います。


まずは私が今回インターネット開通までにたどった流れを紹介します。具体的には以下の様な流れになりましたが、結局 CONSOLIDATE SMART SYSTEM → Spectrum → DIRECTVAT&T → CONSOLIDATE SMART SYSTEMというループをしてます。このたらい回しは non native speaker にはなかなか辛かったっす。。。。

  1. 居住が決まったアパートから勧められた CONSOLIDATED SMART SYSTEM に連絡したが、電話越しにクレジットカード番号の提示を求められ「契約ごとは文章が無いと信用できないからメールで文章よこせ」と突っぱねたにも拘わらず電話でしか連絡が来ないので放置する
    • DIRECTV という有名なプロバイダの Authorized Partner とチラシに書かれていたもののいまいち信用できず
    • 周辺の知人にも「いきなりクレジットカード番号を要求する様なところは辞めた方が良い」と言われて却下
  2. 近所に Spectrum のオフィスがあることが分かったので直接訪問してインターネット契約をお願いしてみるが「お前の住んでるところはサポートしてない」と言われる。「CONSOLIDATED SMART SYSTEM ってところを勧められたがクレジットカード番号を電話越しに聞かれたから信用できない」と答えたところ「DIRECTVへ直に連絡した方がよい」と言われる
  3. DIRECTV へ直接連絡したら「お前の住んでいる場所だとインターネット契約は AT&T を使っているから直接連絡しろ」とたらい回し。DIRECTV は後述の AT&T の様にチャットでのQ&Aサービスがあったのでその点は楽だった。どうやらそもそも DIRECTV はプロバイダ相当らしく、インターネット回線自体は提供できない模様。
  4. AT&T のチャットサービスに以下の様に聞いたところ「お前の住んでるところはよく分からんから直接電話窓口に連絡しろ」と言われる。これまたチャットで話せるのはまだ大分マシ f:id:waritohutsu:20171002085452j:plain
  5. AT&T の窓口に連絡したところ「DIRECTV の契約が無いと紹介できないサービスだ」と言われ、仕方なく DIRECTV の契約を行う
  6. AT&TDIRECTV 契約者専用窓口に電話したところ長々と個人情報とクレジットカード番号を聞かれる。AT&T だからまぁ仕方あるまいとクレジットカード番号を伝えたところ、最終的に「どこでも良いから AT&T の実店舗に行ってID(身分証明書)を見せろ」と言われる
  7. 最寄りの AT&T 実店舗に行ったところ「そんなサービスを聞いたことが無い」と言われ契約が成立せず。「俺はこの電話口の相手と契約の話を進めたのにどっちかが嘘言ってんのか?」位をプッシュしても相手微動だにせず。しかも再度電話をかけたら窓口の相手が変わっており話が進まず。最終的に「契約できねぇのは分かったんだけど、DIRECTVは要らないから解約させろ」という点だけ聞き、DIRECTV の解約だけして帰宅
  8. 最終的に選択子が無かったので CONSOLIDATED SMART SYSTEM に連絡し電話口でクレジットカード番号を仕方なしに伝える。一週間程度でインターネットが開通\(^o^)/


どうも住んでいる場所によって「おススメのインターネット会社」のレベルでなく「そもそも契約できるインターネット会社」が違うようです。私のヒアリング力だと解釈しきれなかったのですが、話を聞くと「お前の住んでるアパートでは一括で Home Association 契約が存在しているので個別契約はできない」という旨を言われて AT&T からは契約を拒否されました\(^o^)/
米国では一軒家レンタルが一般的なので、一軒家レンタルをする場合は個別契約でよいと思いますが、私の様にアパートの場合は住んでる方や Leasing Office(アパートの管理事務所相当)のおススメに素直に従った方が楽だと思います。

インターネット開通前までは T-Mobile 携帯のテザリングを利用してインターネットを利用していたのでえらい回線が遅かったです。しかし、仮にインターネット契約が遅れたとしても、スターバックスや Coffee Beans 等々のカフェでインターネットを気軽に使えるのが米国の良いところです(正直、米国でノマドが流行るわけが分かった気が。。。)。

最後に ~米国での契約について~