In the new Azure portal I can create a new application registration. I have found out that this action consists of multiple steps which I want to achieve with the Graph API.
This is the portal experience which I want to simulate with the Graph API:
- In the App registrations blade I press on the Add+ link to create the registration Test App A.
- I click on Test App A and the blade for this app registration opens. In this blade the value for Managed Application In Local Directory is a link named Test App A.
- I click on that link and a new Enterprise Application - PREVIEW blade for Test App A opens. On that blade the Delete link is enabled and clickable. On that blade under MANAGE the link Conditional access is present.
- I close all blades and open the Enterprise applications blade. There under MANAGE I click on All applications.
- On the Enterprise applications - All applications view I see Test App A listed.
This is what I am doing with the Graph API:
- I send a POST request to https://graph.windows.net/{tenant}/applications?api-version=1.6 to create the Test App A.
- I click on Test App A and the blade for this app registration opens. In this blade the value for Managed Application In Local Directory is the text Log on to the app to create a local instance.
- I send a POST request to https://graph.windows.net/{tenant)/servicePrincipals?api-version=1.6 to create a service principal. The JSON body of the request contains only the property appId with the application ID of the Test App A as its value. This changes the value for Managed Application In Local Directory into a link named Test App A.
- I click on that link and a new Enterprise Application - PREVIEW blade for Test App A opens. On that blade the Delete link is disabled and not clickable. On that blade under MANAGE the link Conditional access is missing.
- I close all blades and open the Enterprise applications blade. There under MANAGE I click on All applications.
- On the Enterprise applications - All applications view the application Test App A is not listed.
What am I missing? Which properties else do I have to send in step 3. What I have to do else?