Questions tagged [microsoft.identity.web]

27 questions
2
votes
1 answer

Azure Active Directory Auth with ASP.NET Core 6 MVC

I created the whole process to use user authentication in my ASP.NET Core 6 MVC application, through Azure Active Directory. I'm using the Microsoft.Identity.Web API for this. I can open the login screen, log in, but the callback (CallbackPath) is…
gtezini
  • 41
  • 4
2
votes
1 answer

Call Graph from Azure App Service using Managed Identity

I have a .NET 6 web API project that calls Graph as the app (rather than on behalf of the user). I'm using the Microsoft.Identity.Web package, and my Program.cs has this code to initialise…
1
vote
1 answer

I have and Azure App Service Running a Web Application and I want to authenticate using a popup window

I have an Azure App Service Running a Web Application (NOT a single page app and NOT using MSAL). I am using C# MVC ASP.NET CORE I am using the MicrosoftIdentityWebAppAuthentication service. My authentication currently works perfectly however, I…
1
vote
1 answer

Using individual Accounts and Microsoft.Identity.Web for Authentication in ASP.NET Core 6

With AzureAD.UI being deprecated I wanted to build a web app that uses individual accounts and Microsoft.Identity.Web for authentication. I have tried multiple ways and twice thought I had it, just to be given an error Error loading external login…
1
vote
0 answers

Microsoft.Identity.Client AcquireTokenOnBehalfOf doesn't get token from cache

I have a problem to figure out how implement cache with AcquireTokenOnBehalfOf. Every time when I call code below for the same user I get different token, so I suppose that there is no inner cache mechanism or something like that. var app =…
1
vote
0 answers

Microsoft.IdentityModel.Clients.ActiveDirectory is deprecated, use Microsoft.Identity.Client

I am using Microsoft.IdentityModel.Clients.ActiveDirectory NuGet and for an app I retrieve token like below code: public async Task GetIotHubClient() { var authContext = new…
user584018
  • 10,186
  • 15
  • 74
  • 160
1
vote
0 answers

microsoft.identity.web - www-authenticate 401 response is missing authorization_uri

I'm trying to put together a quick web api data feed that can be accessed from powerbi using azureAd auth on a .netcore6 app, I've also tried this on .netcore3.1 and get the same results. When using "Organizational account" powerBI expects the below…
1
vote
1 answer

Trying to authenticate with Azure for using Power BI Embedded

Below is the output from an error which is being generated whilst trying to authenticate credentials with Azure for allowing public access to a Power BI Embedded report: It has initially displayed a pop to confirm that I want to give but after I…
1
vote
0 answers

OpenIdConnectOptions not applying?

I'm trying to build an Azure AD B2C web app that allows users to authenticate/authorize using B2C user flows and OpenIDConnect, based off of boilerplate code from Microsoft.Identity.Web. We would like to validate the id_token that's returned from…
1
vote
1 answer

Integrate ASP.NET Core Identity With Microsoft.Identity.Web in Blazor for Authentication

I have been working on authentication methods for my blazor app for some time now. I am currently developing as a standalone protected WebApi + Blazor Server, but will ultimately migrate to standalone protected WebApi + Hosted Blazor WASM so I need…
0
votes
2 answers

Download a file using IDownstreamApi in Microsoft.Identity.Web

I'm trying to download a file using IDownstreamApi I've tried the following code var file = await downstreamApi.GetForAppAsync(Definitions.FileshareApi, options => { options.RelativePath =…
Mark
  • 2,392
  • 4
  • 21
  • 42
0
votes
1 answer

On-behalf-of flow failing with downstream API's using Microsoft.Identity.Web

I'm having difficulty getting a basic OBO example up and running. Any insight is greatly appreciated as I haven't been able to find a complete example that uses my scenario: A client app (WebApp1) that calls api1, which in turn calls api2 via OBO…
0
votes
1 answer

How do I configure the basePath for TokenAcquirerFactory? Encountering an error that basePath cannot be null when trying to call GetDefaultInstance

I have a simple console app that works fine locally. I'm trying to put it in an Azure DevOps pipeline and I encounter an error executing it in the pipeline. It runs via an on-prem AzDO agent. I'm somewhat new .net core and dependency injection. This…
0
votes
0 answers

How to prevent redirect to token provider when restarting/swapping slot

Using ASP.NET Core 6 MVC web app. I followed this thread in the hope that it would prevent redirecting to token provider aka login to Microsoft.identity when data protection was setup: Swapping Azure Web App deployment slots logs out all users in…
Morten_564834
  • 1,479
  • 3
  • 15
  • 26
0
votes
0 answers

OBO token - The right interface to use ITokenAcquisition versus IConfidentialClientApplication

Context: Currently my webAPI uses the OBO flow to call the downstream web API. The way I have configured this is using ITokenAcquisition.GetAccessTokenForUserAsync(..). We are adding another functionality to a do a bulk operation for which OBO token…
Jaya
  • 3,721
  • 4
  • 32
  • 48
1
2