I've been working on a project for a company that is trying to convert their PowerShell script for building out some infrastructure. They'd like this script converted to a form application if possible. I'm still somewhat new to Azure so there are some things that I'm confused about and am curious if anyone can either provide me an answer or point me to some resources that I can read up on. A lot of my confusion so far is how the different Azure API's play together.
For this project, AzureRM is going to be the primary API that we'd use. However in my research, GraphAPI pops up for some of the things I've been playing around with. A lot of my confusion at current comes from trying to distinguish between how to implement and if/how they should be used together.
This application would be a single tenant application for reference.
In my research, I can find a lot of ways that a person can login to their Azure account using the CLI or PowerShell. I haven't been able to find many resources that explain how this would be done programmatically in C# for something like. I have a working login which I use for GraphAPI which allows me to grab basic user information. If I needed to use something like a userID with AzureRM, can I use this userID pulled with GraphAPI or will that cause issues with AzureRM?
If I can't do the above, What is the C# equivalent to az login
with something like AzureRM?
In addition to this, I've been able to find resources for getting an authToken for use with AzureRM. In this case, I'm trying to pull subscription information for the logged in account. Currently, I'm able to get an authToken through PowerShell which is how almost all of the resources I've found show how to do it. Again though, I haven't been able to find any for doing so with C#. Is there a way to get these authTokens programmatically in C#?
It is also entirely possible that I am completely misunderstanding how certain things should be done when trying to use C# with Azure. If anything above is wrong, I'd appreciate an idea of what I'd need to look at to get a correct understanding. Any links to resources that I can use to brush up on these areas to get started is appreciated.