question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to authenticate - documentation links broken, options unclear

See original GitHub issue

I’m trying to authenticate with Azure to dynamically scale SQL Azure databases.

There’s a FromUser method on AzureCredentialsFactory, but the parameters are not explained and there are no examples (should qualify: that I can find). I’ve guessed that Client ID in this case is some unique string, similar in function to a User-Agent header. All I get when calling Azure.Authenticate(...).WithDefaultSubscription() on the returned object is:

Exception thrown: 'System.Collections.Generic.KeyNotFoundException' in System.Private.CoreLib.dll: 'The given key was not present in the dictionary.'
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials.<ProcessHttpRequestAsync>d__25.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Management.ResourceManager.Fluent.SubscriptionsOperations.<ListWithHttpMessagesAsync>d__7.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Management.ResourceManager.Fluent.SubscriptionsOperationsExtensions.<ListAsync>d__2.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Management.ResourceManager.Fluent.Core.Extensions.Synchronize[TResult](Func`1 function)
   at Microsoft.Azure.Management.ResourceManager.Fluent.SubscriptionsImpl.List()
   at Microsoft.Azure.Management.Fluent.Azure.Authenticated.WithDefaultSubscription()

Unfortunately, the documentation:

https://github.com/Azure/azure-libraries-for-net/blob/master/AUTH.md

  1. Doesn’t explain this method or params
  2. Suggests FromServicePrincipal, then links to https://github.com/Azure/azure-libraries-for-net/blob/master/AUTH.md#creating-a-service-principal-in-azure which doesn’t exist

If I don’t want to use the file-based approach (“an experimental feature that may or may not be available in later releases”), please, any tips?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hovsepmcommented, Jan 2, 2018
0reactions
kierenjcommented, Jan 22, 2019

Just a quick note that the “service principal registration” link is still linking nowhere.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Find Broken Links Using The SEO Spider
3) View The Source Of The Broken Links By Clicking The 'Inlinks' Tab. Obviously you'll want to know the source of the broken...
Read more >
Broken Link Checker – WordPress plugin
Check posts, pages & all content for broken links & missing images to improve SEO. Get notified when bad links are found.
Read more >
How do find broken document links in SharePoint libraries
We are trying to find all broken document links in a SharePoint document library. These links are stored in libraries as .url files....
Read more >
Troubleshooting link issues
In a private or incognito window, visit the page on your site with the link. Click the link to confirm it works correctly....
Read more >
The esi.microsoft.com login/link process is confusing and broken ...
I am trying to setup an account to take multiple Azure certification exams. I created an account on esi.microsoft.com with my "work" email...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found