Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/azure-cli/azure/cli/command_modules/role/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
"If needed, use the --role argument to explicitly create a role assignment."
)

NAME_DEPRECATION_WARNING = \
"'name' property in the output is deprecated and will be removed in the future. Use 'appId' instead."

logger = get_logger(__name__)

# pylint: disable=too-many-lines
Expand Down Expand Up @@ -1500,7 +1497,6 @@ def create_service_principal_for_rbac(
raise

logger.warning(CREDENTIAL_WARNING)
logger.warning(NAME_DEPRECATION_WARNING)

if show_auth_for_sdk:
from azure.cli.core._profile import Profile
Expand All @@ -1514,7 +1510,6 @@ def create_service_principal_for_rbac(
result = {
'appId': app_id,
'password': password,
'name': app_id,
'displayName': app_display_name,
'tenant': graph_client.config.tenant_id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def test_sp_create_scenario(self):
result = self.cmd('ad sp create-for-rbac -n {display_name} --skip-assignment',
checks=self.check('displayName', '{display_name}')).get_output_in_json()

self.assertEqual(result['name'], result['appId'])
self.kwargs['app_id'] = result['appId']

# show/list app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def test_create_for_rbac_with_right_display_name(self):

try:
sp_info = self.cmd('ad sp create-for-rbac -n {display_name} --skip-assignment').get_output_in_json()
self.assertTrue(sp_info['name'] == sp_info['appId'])
self.assertTrue(sp_info['displayName'] == sp_name)
self.kwargs['app_id'] = sp_info['appId']

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ def test_create_for_rbac_password_plumbed_through(self, graph_client_mock, auth_
result = create_service_principal_for_rbac(cmd, name, 12, skip_assignment=True)

# assert
self.assertEqual(result['name'], test_app_id)
self.assertEqual(result['displayName'], name)
self.assertEqual(result['appId'], test_app_id)

Expand Down Expand Up @@ -175,7 +174,6 @@ def mock_app_create(parameters):
result = create_service_principal_for_rbac(cmd, name, cert=cert, years=2, skip_assignment=True)

# assert
self.assertEqual(result['name'], test_app_id)
self.assertEqual(result['appId'], test_app_id)
self.assertTrue(logger_mock.warning.called) # we should warn 'years' will be dropped
self.assertTrue(faked_graph_client.applications.create.called)
Expand Down