Forum Discussion

nbs33's avatar
nbs33
Helper II
3 years ago
Solved

Error Authenticating as Service Principal using PowerShell Script

I am trying to write some scripts to manage out PBI for an embed project. I am using the PS script below that I found online.  I am going this "Cannot bind argument to parameter 'Credential' because ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi nbs33 ,

     

    To learn how to create a service principal for use with Azure PowerShell, see Create an Azure service principal with Azure PowerShell.

     

    To sign in with a service principal, use the ServicePrincipal parameter of the Connect-AzAccount cmdlet. You'll also need the service principal's application ID, sign-in credentials, and the tenant ID associate with the service principal. How you sign in with a service principal depends on whether it's configured for password-based or certificate-based authentication.

     

    For reference:

    Password-based authentication

    Certificate-based authentication

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.