Questions tagged [microsoft-identity-web]
111 questions
0
votes
0 answers
Call secured ASP.NET Web Core API that calls Graph API on behalf of user from Microsoft Bot Composer
From Microsoft Bot Composer, I successfully sign the user in and can retrieve the oauth token from the user. Now I want to call a secure APT.NET Core Web API and then call the Microsoft Graph…

mercer
- 321
- 1
- 3
- 12
0
votes
0 answers
What is the criteria for determining when to modify principal/identity in OnTokenValidated vs in IClaimsTransformation?
I'm struggling a bit with deciding the best ways to augment a ClaimsPrincipal/ClaimsIdentity. I can add a new identity or modify claims on the provided identity. I could clone or just modify the principal. I can do these changes in OnTokenValidated…

Arian Kulp
- 831
- 8
- 31
0
votes
1 answer
ASP.NET Core Web API that calls web APIs via client credential flow - MSAL.NET or Microsoft.Identity.Web?
Going to have a web api that calls another web api requiring the OAuth client credential flow. The web api does not need authentication.
Should I use MSAL.NET instead of Microsoft.Identity.Web in this case?
I have read…

FranklinWhale
- 73
- 5
0
votes
0 answers
AzureAD B2C - AddMicrosoftIdentityUserAuthenticationHandler does not work as expected
I am using AzureB2C with a number of dotnet6.0 WebApps and WebAPI applications. One of my WebApps calls two different WebAPIs, both of which are registered, along with their scopes, in AzureB2C. Typically, in my controller code, I inject the…

jcaddy
- 501
- 4
- 17
0
votes
1 answer
Acquire multiple scopes at once - ASP.NET Core MVC
I'm building an ASP.NET Core 6 MVC app and using the Microsoft.Identity.Web package for authentication and authorization.
How can my application acquire multiple scopes at once when a user from a new tenant logs in for the first time?
My app will be…

dybzon
- 1,236
- 2
- 15
- 21
0
votes
1 answer
AzureADB2CDefaults obsolete, how do I replace it?
I'm in the process of updating some nuget packages and noticed that AzureADB2CDefaults has been made obsolete. I know that Microsoft.Identity.UI has incorporated AzureADB2C into it but I'm unsure how to use it whilst still referencing AzureADB2C,…

Jackington
- 127
- 10
0
votes
1 answer
How do you handle authentication and token refresh with Microsoft Identity and Azure AD
I'm attempting to secure a .Net 6.0 / Razor Page web application against Azure AD. I was able to complete the application registration with Azure AD and successfully authenticate users. The issue I'm facing occurs when the issued token expires. I…

Nakorr
- 63
- 6
0
votes
0 answers
C# Microsoft Identity Framework multitenant application authenticate with guest accounts
I'm building a multitenant application that also needs to sign guest users (users added as guests, not anonymous). The guest must be able to access resources in the tenant. For example:
User X from Tenant A is a guest in Tenant B. Must be able to…

JACH
- 996
- 11
- 20
0
votes
1 answer
Accessing a .net core REST API from an outlook web addin using microsoft identity platform
I have a .net core web REST api (.net 6.0) which uses microsoft identity platform to authenticate and authorize user access from a frontend. That is working fine.
Authentication is configured like…

pgross
- 510
- 5
- 16
0
votes
1 answer
Does Microsoft.Identity.Web include a class to get and read a OIDC Discovery Document (Well Known Configuration)?
OIDC has a "Well Known Configuration" page that is commonly hosted by the Identity Provider (IDP), also called a Discovery Document. I am trying to figure out Microsoft.Identity.Web and can't seem to find a way to read in the discovery document…

Vaccano
- 78,325
- 149
- 468
- 850
0
votes
0 answers
Is it possible to do user impersonation in a .NET app protected by Azure Active Directory?
I have a simple .NET 6 app where users login through Azure AD. Is there a way to do impersonation where my admins can login as any user for troubleshooting purposes?
My app is using Microsoft.Identity.Web, I don't have an API or anything at this…

Victorio Berra
- 2,760
- 2
- 28
- 53
0
votes
0 answers
How to extend user validation with Microsoft Identity Platform?
I am developing a Razor Pages application with Azure Active Directory authentication. There is no page in the application which is available without authentication. I need to check whether the user authenticated by AD is present in my DB. So I need…

IvanH
- 5,039
- 14
- 60
- 81
0
votes
1 answer
Custom post Sign-in page and Sign-out page for Microsoft Identity platform
I would like to use Microsoft Identity platform in my ASP.NET Core.NET 6 application with a custom sign in and sign out page.
In my case, i don't want to redirect automatically user to Microsoft sign in page but to my custom sign in page (that…

Mohamed Ncir
- 21
- 9
0
votes
2 answers
How to combine custom permission-based authorization with MicrosoftIdentity/MSAL in Hosted Blazor WebASM
As the title, i'm trying but still found no solution.
This is flow: User <-> Blazor.Client <-> Blazor.Server <-> External APIs.
Blazor.Client: MSAL Authentication
Blazor.Server: MicrosoftIdentityWebApi Authentication
Can I use my custom Claim…
user18577597
0
votes
0 answers
TokenValidationParameters validation for multi-tenant ASP.NET Core Web API application
This code is working for a single tenant application. How does it need to be changed to work with multi-tenant application (Web API)? Is setting ValidateIssuer = false the right way?
sample
services.AddAuthentication(options =>
{
…

DevÁsith
- 1,072
- 12
- 38