GithubHelp home page GithubHelp logo

new-azdoserviceconnection's Introduction

new-azdoserviceconnection's People

Contributors

ba4bes avatar bjompen avatar

Stargazers

clint_zofnas avatar Roberto Cáceres avatar David Dyer avatar  avatar Alan avatar Cocoy avatar Gordon Byers avatar  avatar

Watchers

James Cloos avatar  avatar

new-azdoserviceconnection's Issues

Serviceprincipal layout changed.

Since this command was written it seems there has been a change in the layout of the ServicePrincipal object used.

  • ApplicationId has been renamed AppId
  • The plaintextsecret is now available directly in PasswordCredentials.SecretText

Since this command is connected to a bloggpost (most excelent one, as always!) I don't know if you want to update the command,
but if you want a PR is incoming.

Disclaimer: I have not verified the changes in PowerShell 5.1, and have not changed the if/else statement,
but since this is an endpoint change in Azure I imagine you could get rid of the entire if/else block and just use the variable in line 168.

//Björn

Cmdlet does not work in Windows PowerShell

The cmdlet does not work in Windows PowerShell, only in PowerShell 6+.
It should also work in Windows PowerShell 5.1 (or at least give a notification on that it doesn't work in Windows PowerShell

C:\...> New-AzDoServiceConnection @Parameters -Verbose -AzDoConnectionName ...
VERBOSE: Starting Function New-AzDoServiceConnection
VERBOSE: Scope set: /subscriptions/...
VERBOSE: No start date provided - using the current time as default.
VERBOSE: No value specified for -EndDate parameter; setting the value to one year after start date.
VERBOSE: No application id provided - created new AD application with application id '...'
WARNING: Assigning role 'owner' over scope '/subscriptions/...' to the new service principal.
VERBOSE: Role assignment with role 'owner' and scope '/subscriptions/...' successfully created
for the created service principal.
VERBOSE: Created ServicePrincipal example
VERBOSE: GET https://dev.azure.com/.../_apis/projects?api-version=6.0 with 0-byte payload
VERBOSE: received 537-byte response of content type application/json; charset=utf-8; api-version=6.0
VERBOSE: Collected Azure DevOps Projects
VERBOSE: Collected ID: ...
ConvertFrom-SecureString : A parameter cannot be found that matches parameter name 'AsPlainText'.
At C:\Users\...\WindowsPowerShell\Modules\NewAzDoServiceConnection\0.0.3\NewAzDoServiceConnection.psm1:178 char:92
+ ...  = ($ServicePrincipal.Secret | ConvertFrom-SecureString -AsPlainText)
+                                                             ~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [ConvertFrom-SecureString], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.ConvertFromSecureStringCommand

VERBOSE: Creating Connection
VERBOSE: POST https://dev.azure.com/.../.../_apis/serviceendpoint/endpoints?api-version=6.0-preview.4 with
0-byte payload
Could not create Connection: Value cannot be null.
Parameter name: endpoint
At C:\...\Documents\WindowsPowerShell\Modules\NewAzDoServiceConnection\0.0.3\NewAzDoServiceConnection.psm1:209 char:9
+         Throw "Could not create Connection: $($ErrorMessage.message)"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Could not creat... name: endpoint:String) [], RuntimeException
    + FullyQualifiedErrorId : Could not create Connection: Value cannot be null.
Parameter name: endpoint

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.