diff --git a/src/azure-cli/azure/cli/command_modules/role/custom.py b/src/azure-cli/azure/cli/command_modules/role/custom.py index 2810cbaa99e..979b63d6fe1 100644 --- a/src/azure-cli/azure/cli/command_modules/role/custom.py +++ b/src/azure-cli/azure/cli/command_modules/role/custom.py @@ -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 @@ -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 @@ -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 } diff --git a/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_graph.py b/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_graph.py index 2d8c8c4ec85..8fc5f4d8940 100644 --- a/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_graph.py +++ b/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_graph.py @@ -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 diff --git a/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role.py b/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role.py index 3f587660a55..76e3b247738 100644 --- a/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role.py +++ b/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role.py @@ -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'] diff --git a/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role_commands_thru_mock.py b/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role_commands_thru_mock.py index 9ca799fdde2..4ebf5b5fc61 100644 --- a/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role_commands_thru_mock.py +++ b/src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role_commands_thru_mock.py @@ -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) @@ -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)