Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kudu Rest Api Credential issue for VFS. #1804

Closed
kevinneufeld opened this issue Nov 17, 2015 · 2 comments
Closed

Kudu Rest Api Credential issue for VFS. #1804

kevinneufeld opened this issue Nov 17, 2015 · 2 comments

Comments

@kevinneufeld
Copy link

$username = "`$website"
$password = "pwd"
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))

$apiUrl = "https://{sitename}.scm.azurewebsites.net/api/vfs/site/wwwroot/"
Invoke-RestMethod -Uri $apiUrl -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Method GET -ContentType "application/json";

Following your PS example with a the following change:

  • Endpoint: api/vfs/site/wwwroot/
  • ContentType: "application/json"

I have tried 4 different sets of Credentials:

  1. Deployment Credentials (my azure creds)
  2. Deployment Credentials (azure AD creds)
  3. PublishProfile
  4. Site's own deployment creds.

It either returns a 401 or i get the contents of the redirect page to login.

Must be something simple I am missing.

@davidebbo
Copy link
Member

Please see https://github.com/projectkudu/kudu/wiki/Deployment-credentials for details on the two kind of credentials that are valid to talk to the scm site.

@davidebbo
Copy link
Member

Also, to isolate from PowerShell, please first test your credentials by going to https://{sitename}.scm.azurewebsites.net/basicauth in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants