Trying to authenticate - documentation links broken, options unclear
See original GitHub issueI’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
- Doesn’t explain this method or params
- 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:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kierenj you can find authentication information on here - https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-scenarios
Just a quick note that the “service principal registration” link is still linking nowhere.