I have an app created by VS's Windows Template Studio. I have the authentication working and I can successfully get a token using the same credentials I use for the Azure portal (Interactive).
using Microsoft.Identity.Client
...
private IPublicClientApplication _client;
_client = PublicClientApplicationBuilder.Create(_clientId)
.WithAuthority(AadAuthorityAudience.AzureAdMultipleOrgs)
.WithRedirectUri($"msal{_clientId}://auth")
.Build();
var accounts = await _client.GetAccountsAsync();
_authenticationResult = await _client.AcquireTokenInteractive(_scopes)
.WithAccount(accounts.FirstOrDefault())
.ExecuteAsync();
How do I use the token with the Azure API libraries such as:
Microsoft.Azure.Management.ResourceManager.Fluent
Microsoft.Azure.Services.AppAuthentication