Skip to content

Commit 73b4fce

Browse files
authored
[Subscription]az account create: Fix --owner-upn and --owner-spn not working (#8314)
1 parent ea6fff6 commit 73b4fce

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/subscription/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
1.0.0b2
7+
+++++++
8+
* `az account create`: Fix `--owner-upn` and ` --owner-spn ` not working
9+
610
1.0.0b1
711
+++++++
812
* Migrate to AAZ commands

src/subscription/azext_subscription/custom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _get_object_id_by_spn(graph_client, spn):
2626
logger.warning("Multiple service principals found with spn '%s'. "
2727
"You can avoid this by specifying object id.", spn)
2828
return None
29-
return accounts[0].object_id
29+
return accounts[0]['id']
3030

3131

3232
def _get_object_id_by_upn(graph_client, upn):
@@ -38,7 +38,7 @@ def _get_object_id_by_upn(graph_client, upn):
3838
logger.warning("Multiple users principals found with upn '%s'. "
3939
"You can avoid this by specifying object id.", upn)
4040
return None
41-
return accounts[0].object_id
41+
return accounts[0]['id']
4242

4343

4444
def _get_object_id_from_subscription(graph_client, subscription):

src/subscription/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
# HISTORY.rst entry.
13-
VERSION = '1.0.0b1'
13+
VERSION = '1.0.0b2'
1414

1515
# The full list of classifiers is available at
1616
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

0 commit comments

Comments
 (0)