New-AzureADServicePrincipal : A positional parameter cannot be found that accepts argument 'AppId'

Fred Xu 40 Reputation points
2024-11-15T05:52:57.2733333+00:00

I refer to MS learning doc, to setup Azure Data Lake, an error was reported at this stage of execution.

Someone who has solved this problem before could help me fix it? thanksUser's image

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Deepanshu katara 16,720 Reputation points MVP Moderator
    2024-11-15T05:58:43.52+00:00

    Hello Fred, Welcome to MS Q&A

    The error message "A positional parameter cannot be found that accepts argument 'AppId'" indicates that the New-AzureADServicePrincipal command is being used incorrectly. The New-AzureADServicePrincipal command does not accept an AppId parameter directly as a positional argument.

    To create a new Azure AD service principal, you should use the -AppId parameter explicitly. Here is the correct syntax:

    New-AzureADServicePrincipal -AppId <YourAppId>
    
    
    

    Make sure to replace <YourAppId> with the actual Application ID of the app for which you want to create the service principal.

    Hopefully this will fix your issue

    Kindly accept if it works

    Thanks

    Deepanshu


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.