{"id":2945,"date":"2018-05-23T19:55:29","date_gmt":"2018-05-23T19:55:29","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/aaddevsup\/?p=2945"},"modified":"2021-02-18T23:05:26","modified_gmt":"2021-02-18T23:05:26","slug":"how-to-change-a-display-name-of-a-registered-application-from-another-application","status":"publish","type":"post","link":"https:\/\/blogs.aaddevsup.xyz\/2018\/05\/how-to-change-a-display-name-of-a-registered-application-from-another-application\/","title":{"rendered":"How to change a display Name of a registered application from another application"},"content":{"rendered":"
This post will show you to change a displayName of a registered web application from another application using client credentials flow with Application Permission<\/p>\n
1) In Azure AD\u2019s App Registration portal, create 2 new app registrations called TestAppA and TestAppB. We will use TestAppA to change the display Name of TestAppB. It is not important what permission you configure for TestAppB. For TestAppA make sure you configure Microsoft Graph\u2019s Application.ReadWrite.OwnedBy permission (check the option for \u201cManage apps that this app creates or owns) under Application Permission and also click on the \u201cGrant Permission\u201d button to provide admin consent to TestAppA<\/p>\n
<\/a><\/p>\n Also note the Application ID for both TestAppA and TestAppB<\/p>\n <\/a><\/p>\n 2) For TestAppA create a new key and note its value:<\/p>\n <\/a><\/p>\n 3) Get the Object ID of TestAppA\u2019s Service Principal from the Enterprise applications blade<\/p>\n <\/a><\/p>\n 4) Use Microsoft Graph Explorer<\/a> tool to make the TestAppA\u2019s Object ID obtained in step 3 the owner of TestAppB by issuing the following POST request:<\/p>\n POST https:\/\/graph.microsoft.com\/applications\/{id of App2}<\/span>\/owners\/$ref “@odata.id”:”https:\/\/graph.microsoft.com\/v1.0\/servicePrincipals\/{SP ObjectId of App1}<\/span>“<\/p>\n }<\/p>\n <\/a><\/p>\n Note<\/strong><\/span>: Wait at least 20 minutes to perform the steps below:<\/p>\n 5) For demo purposes I am using PostMan in this step to get an access token for TestAppA.<\/p>\n POST request to https:\/\/login.microsoftonline.com\/<Directory ID>\/oauth2\/v2.0\/token<\/u><\/p>\n POST body:<\/p>\n grant_type=client_credentials&scope=https:\/\/graph.microsoft.com\/.default&client_id=<TestAppA App ID>&client_secret=xxx<\/p>\n
\nPOST Body:
\n{<\/p>\n