az ad sp create-for-rbac --name autotools-master-sp --role contributor --scope /subscriptions/<subscript id>/myRG
Role assignment creation failed.
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': '297b982c-922a-4940-91b4-fcd6478c87f3', 'x-ms-correlation-request-id': '297b982c-922a-4940-91b4-fcd6478c87f3', 'x-ms-routing-request-id': 'WESTUS:20180928T211950Z:297b982c-922a-4940-91b4-fcd6478c87f3', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'Date': 'Fri, 28 Sep 2018 21:19:49 GMT', 'Content-Length': '407'}
The api-version '2018-01-01-preview' is invalid. The supported versions are '2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
$ az --version
azure-cli (2.0.46)
acr (2.1.5)
acs (2.3.4)
advisor (0.6.0)
ams (0.2.3)
appservice (0.2.4)
backup (1.2.1)
batch (3.4.0)
batchai (0.4.3)
billing (0.2.0)
botservice (0.1.1)
cdn (0.1.1)
cloud (2.1.0)
cognitiveservices (0.2.3)
command-modules-nspkg (2.0.2)
configure (2.0.18)
consumption (0.4.0)
container (0.3.4)
core (2.0.46)
cosmosdb (0.2.1)
dla (0.2.3)
dls (0.1.3)
dms (0.1.1)
eventgrid (0.2.0)
eventhubs (0.2.4)
extension (0.2.1)
feedback (2.1.4)
find (0.2.12)
interactive (0.3.30)
iot (0.3.2)
iotcentral (0.1.2)
keyvault (2.2.3)
lab (0.1.1)
maps (0.3.2)
monitor (0.2.3)
network (2.2.5)
nspkg (3.0.3)
policyinsights (0.1.0)
profile (2.1.1)
rdbms (0.3.2)
redis (0.3.2)
relay (0.1.2)
reservations (0.4.0)
resource (2.1.4)
role (2.1.5)
search (0.1.1)
servicebus (0.2.3)
servicefabric (0.1.3)
signalr (1.0.0)
sql (2.1.4)
storage (2.2.2)
telemetry (1.0.0)
vm (2.2.3)
Python location '/opt/az/bin/python3'
Extensions directory '/home/myname/.azure/cliextensions'
Python (Linux) 3.6.5 (default, Sep 18 2018, 21:58:22)
[GCC 5.4.0 20160609]
Legal docs and information: aka.ms/AzureCliLegal
**Additional context**
Add any other context about the problem here.
Describe the bug
az ad sp create-for-rbacuse wrong apiVersion.To Reproduce
Output:
Expected behavior
The service principal been created an role been assigned properly.
Environment summary
Azure Cloud Shell Bash