Changed Service Principal Creation sequence to comply with newer CLI reqs
This commit is contained in:
parent
fdbb7a0b3f
commit
a5c6d3743e
|
@ -64,7 +64,7 @@ requirements() {
|
||||||
echo "jq is missing. Please install jq from"
|
echo "jq is missing. Please install jq from"
|
||||||
echo "https://stedolan.github.io/jq/"
|
echo "https://stedolan.github.io/jq/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $found -lt 2 ]; then
|
if [ $found -lt 2 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -145,10 +145,18 @@ createStorageAccount() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createApplication() {
|
||||||
|
echo "==> Creating application"
|
||||||
|
azure_client_id=$(azure ad app create -n $meta_name -i http://$meta_name --home-page http://$meta_name -p $azure_client_secret --json | jq -r .appId)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error creating application: $meta_name @ http://$meta_name"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
createServicePrincipal() {
|
createServicePrincipal() {
|
||||||
echo "==> Creating service principal"
|
echo "==> Creating service principal"
|
||||||
azure_object_id=$(azure ad sp create -n $meta_name --home-page http://$meta_name --identifier-uris http://$meta_name/example -p $azure_client_secret --json | jq -r .objectId)
|
azure ad sp create $azure_client_id
|
||||||
azure_client_id=$(azure ad app show -c $meta_name --json | jq -r .[0].appId)
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Error creating service principal: $azure_client_id"
|
echo "Error creating service principal: $azure_client_id"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue