How to create an azure ad app with another azure ad app

Hello All,

I have requirement to create an AAD app2 with another AAD app1. When I have tried to login to Azure with AAD aap1 in Power shell and create another AAD app2, it is throwing me error like " Resource not found for the segment ‘me’.
I am not sure, if there are any API permissions to be given to the AAD app1.

Can some one help me on this - how to create AAD app2 with another AAD App1 ?
and what are the API permissions to be given to AAD app1 to create an app without any error?

Also please let me know if I need to take care of any other context in coding.

Thanks
Lakshmi Koduri