@Rahul , When you try to create an application using either Powershell or Microsoft Graph API, the application object (app registration part) and the service principal object (enterprise registration part) have to be created by running separate commands. This doesnt work the same way as in the Azure Portal.
Powershell:
When you run the following command:
New-AzureADApplication -DisplayName "My new SAML application" -IdentifierUris "http://mynewapp.contoso.com" -SamlMetadataURL "http://mynewapp.contoso.com/metadata.xml"; -ReplyUrls "http://mynewapp.contoso.com/finishLogin";
This only creates the Application object for you. After this you would have to run the following command to create its corresponding service principal.
New-AzureADServicePrincipal -AccountEnabled $true -AppId $samlApp.AppId
-AppRoleAssignmentRequired $true -DisplayName $appName
-Tags {WindowsAzureActiveDirectoryIntegratedApp}
Your overall Powershell code should look something like:
$appName = "SAMLAppTest1"
$samlApp = New-AzureADApplication -DisplayName $appName `
-IdentifierUris "http://mynewapp.contoso.com" `
-SamlMetadataURL "http://mynewapp.contoso.com/metadata.xml" `
-ReplyUrls "http://mynewapp.contoso.com/finishLogin"
Get-AzureADApplication -SearchString $appName
New-AzureADServicePrincipal -AccountEnabled $true `
-AppId $samlApp.AppId `
-AppRoleAssignmentRequired $true `
-DisplayName $appName `
-Tags {WindowsAzureActiveDirectoryIntegratedApp}
Get-AzureADServicePrincipal -SearchString $appName
Same goes for Microsoft Graph API.
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.