<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question deploy Cloudbreak cluster on Azure without admin or co-admin permissions in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/deploy-Cloudbreak-cluster-on-Azure-without-admin-or-co-admin/m-p/222501#M184371</link>
    <description>&lt;P&gt;
	In Cloudbreak, there are two ways to launch clusters on Azure:
&lt;/P&gt;
&lt;UL&gt;
	&lt;LI&gt;&lt;STRONG&gt;interactive login&lt;/STRONG&gt;: requires admin or co-admin credentials on Azure. I don't have these permissions.&lt;/LI&gt;
	&lt;LI&gt;&lt;STRONG&gt;app based&lt;/STRONG&gt;: can deploy a cluster using an existing 'Contributor' role. &lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;
	Cloudbreak requires the following attributes in order to launch a cluster using the app based method: subscription id, tenant id, app id, and password. Here's what we did to get them:
&lt;/P&gt;
&lt;PRE&gt;
# login
az login
# create resource group
az group create --name woolford --location westus
# subscription ID
az account show | jq -r '.id'
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx797
# tenant ID
az account show | jq -r '.tenantId'
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx85d
# create an application
az ad app create --display-name woolford --homepage &lt;A href="https://woolford.azurehdinsight.net" target="_blank"&gt;https://woolford.azurehdinsight.net&lt;/A&gt; --identifier-uris &lt;A href="https://woolford.azurehdinsight.net" target="_blank"&gt;https://woolford.azurehdinsight.net&lt;/A&gt; --password myS3cret!
# get the application ID
az ad app list --query "[?displayName=='woolford']" | jq -r '.[0].appId'
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxa31
&lt;/PRE&gt;
&lt;P&gt;
	We tried to deploy the a cluster with Cloudbreak and received the following error:
&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
	Failed to verify the credential: Status code 401, {"error":{"code":"InvalidAuthenticationToken","message":"The received access token is not valid: at least one of the claims 'puid' or 'altsecid' or 'oid' should be present. If you are accessing as application please make sure service principal is properly created in the tenant."}}
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
	We then attempted to create the service the service principal:
&lt;/P&gt;
&lt;PRE&gt;
az ad sp create-for-rbac --name woolford --password "myS3cret!" --role Owner (same outcome for --role Contributor)
&lt;/PRE&gt;
&lt;P&gt;
	... and received the following error:
&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
	role assignment response headers: {'Cache-Control': 'no-cache', 'Pragma': 'no-cache', 'Content-Type': 'application/json; charset=utf-8', 'Expires': '-1', 'x-ms-failure-cause': 'gateway', 'x-ms-request-id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxe01', 'x-ms-correlation-request-id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxe01', 'x-ms-routing-request-id': 'EASTUS:20171017T025354Z:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxe01', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Date': 'Tue, 17 Oct 2017 02:53:53 GMT', 'Connection': 'close', 'Content-Length': '305'}

The client 'awoolford@hortonworks.com' with object id 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxb67' does not have authorization to perform action 'Microsoft.Authorization/roleAssignments/write' over scope '/subscriptions/7xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx797'.

&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
	Can you see what we're doing wrong? Is it possible to create a service principal for an application that I created (if I'm not an admin or co-admin)? If so, how?
&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2017 10:59:08 GMT</pubDate>
    <dc:creator>awoolford</dc:creator>
    <dc:date>2017-10-17T10:59:08Z</dc:date>
    <item>
      <title>deploy Cloudbreak cluster on Azure without admin or co-admin permissions</title>
      <link>https://community.cloudera.com/t5/Support-Questions/deploy-Cloudbreak-cluster-on-Azure-without-admin-or-co-admin/m-p/222501#M184371</link>
      <description>&lt;P&gt;
	In Cloudbreak, there are two ways to launch clusters on Azure:
&lt;/P&gt;
&lt;UL&gt;
	&lt;LI&gt;&lt;STRONG&gt;interactive login&lt;/STRONG&gt;: requires admin or co-admin credentials on Azure. I don't have these permissions.&lt;/LI&gt;
	&lt;LI&gt;&lt;STRONG&gt;app based&lt;/STRONG&gt;: can deploy a cluster using an existing 'Contributor' role. &lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;
	Cloudbreak requires the following attributes in order to launch a cluster using the app based method: subscription id, tenant id, app id, and password. Here's what we did to get them:
&lt;/P&gt;
&lt;PRE&gt;
# login
az login
# create resource group
az group create --name woolford --location westus
# subscription ID
az account show | jq -r '.id'
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx797
# tenant ID
az account show | jq -r '.tenantId'
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx85d
# create an application
az ad app create --display-name woolford --homepage &lt;A href="https://woolford.azurehdinsight.net" target="_blank"&gt;https://woolford.azurehdinsight.net&lt;/A&gt; --identifier-uris &lt;A href="https://woolford.azurehdinsight.net" target="_blank"&gt;https://woolford.azurehdinsight.net&lt;/A&gt; --password myS3cret!
# get the application ID
az ad app list --query "[?displayName=='woolford']" | jq -r '.[0].appId'
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxa31
&lt;/PRE&gt;
&lt;P&gt;
	We tried to deploy the a cluster with Cloudbreak and received the following error:
&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
	Failed to verify the credential: Status code 401, {"error":{"code":"InvalidAuthenticationToken","message":"The received access token is not valid: at least one of the claims 'puid' or 'altsecid' or 'oid' should be present. If you are accessing as application please make sure service principal is properly created in the tenant."}}
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
	We then attempted to create the service the service principal:
&lt;/P&gt;
&lt;PRE&gt;
az ad sp create-for-rbac --name woolford --password "myS3cret!" --role Owner (same outcome for --role Contributor)
&lt;/PRE&gt;
&lt;P&gt;
	... and received the following error:
&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
	role assignment response headers: {'Cache-Control': 'no-cache', 'Pragma': 'no-cache', 'Content-Type': 'application/json; charset=utf-8', 'Expires': '-1', 'x-ms-failure-cause': 'gateway', 'x-ms-request-id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxe01', 'x-ms-correlation-request-id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxe01', 'x-ms-routing-request-id': 'EASTUS:20171017T025354Z:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxe01', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Date': 'Tue, 17 Oct 2017 02:53:53 GMT', 'Connection': 'close', 'Content-Length': '305'}

The client 'awoolford@hortonworks.com' with object id 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxb67' does not have authorization to perform action 'Microsoft.Authorization/roleAssignments/write' over scope '/subscriptions/7xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx797'.

&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
	Can you see what we're doing wrong? Is it possible to create a service principal for an application that I created (if I'm not an admin or co-admin)? If so, how?
&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 10:59:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/deploy-Cloudbreak-cluster-on-Azure-without-admin-or-co-admin/m-p/222501#M184371</guid>
      <dc:creator>awoolford</dc:creator>
      <dc:date>2017-10-17T10:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: deploy Cloudbreak cluster on Azure without admin or co-admin permissions</title>
      <link>https://community.cloudera.com/t5/Support-Questions/deploy-Cloudbreak-cluster-on-Azure-without-admin-or-co-admin/m-p/222502#M184372</link>
      <description>&lt;P&gt;You should ask your azure administrator to run the "az ad sp create-for-rbac..." command for you. Only the admin users can assign roles.&lt;/P&gt;&lt;P&gt;It will create an application, principal for application and assign the role for the principal.&lt;/P&gt;&lt;P&gt;Then you can use the output of this command (it contains app-id) with cloudbreak.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 16:01:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/deploy-Cloudbreak-cluster-on-Azure-without-admin-or-co-admin/m-p/222502#M184372</guid>
      <dc:creator>perdos</dc:creator>
      <dc:date>2017-10-17T16:01:59Z</dc:date>
    </item>
  </channel>
</rss>

