Questions tagged [microsoft-identity-web]

111 questions
2
votes
2 answers

How do I authorise the Hangfire Dashboard via Microsoft Single Sign-On with Angular 12 and ASP.Net Core 5

My application is an Angular 12 application running on ASP.Net Core 5. I am currently trying to lock down Hangfire so that it will only work for people with the Admin role. It uses Microsoft Identity to log in - specifically Single Sign-on, set up…
tone
  • 1,374
  • 20
  • 47
2
votes
1 answer

Dotnet-Isolated Azure Functions - how to access HttpContext

I have a dotnet 5 Azure Function (dotnet-isolated) that is triggered by an HTTP call. The function will be called by a different Azure function app and I'd like to secure the target with Azure AD and use "client-credentations" OAuth2 flow. I found…
2
votes
0 answers

How do I give my API both App and Delegated permissions using Graph and Microsoft Identity Web

Problem Statement I am writing an application that requires access to a OneDrive group that the user does not necessarily have access to. This (to me) means that I need to use application permissions, specifically "Sites.Selected". The application…
2
votes
2 answers

.Net Core 5 AddMicrosoftIdentityWebAppAuthentication, how to combine OpenId and Bearer now?

Porting from .NET Core 3 to .NET Core 5 Authentication, I am required to replace services.AddSignIn (deprecated) by services.AddMicrosoftIdentityWebAppAuthentication or other related MicrosoftIdentity extensions. I need to support both OpenId user…
GGleGrand
  • 1,565
  • 1
  • 20
  • 45
1
vote
0 answers

Getting 401 error instead of being redirected to login page with ms_identity_web.login_required decorator in Django app

I have a django app which uses the ms_identity_web repository (https://github.com/Azure-Samples/ms-identity-python-samples-common) to authenticate against an Azure Active Directory. Authentication works fine, but when i directly (not logged in)…
1
vote
1 answer

Why is SignUpSignInPolicyId required for an API?

This sample here shows providing a SignUpSignInPolicyId https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/4-WebApp-your-API/4-2-B2C See the appsettings.json for the service (Web API): "AzureAdB2C": { …
1
vote
1 answer

PHP HTTP Request Ignoring Parameter

Before I begin with my question, I will mention that I am re-learning PHP after a long time away from the language. Please be gentle. Also, I know that I could use a library like curl to do some of these things, but I would like to understand how…
Michael
  • 33
  • 5
1
vote
1 answer

AddMicrosoftIdentityWebApp with two providers isn't setting IsAuthenticated

I'm trying to get a dual authentication approach working for my .NET6 website. For the front-end, I'm implementing Azure AD B2C, and for the back-end, Azure AD. Here's my code: Startup.cs public void ConfigureServices(IServiceCollection…
1
vote
1 answer

microsoft-identity-express - Why can't I successfully sign in?

I am trying to connect my NodeJs Express App to the Microsoft Graph API so that I can send automated emails. So far, I've been following this guide to connect my app to the microsoft-identify-express package with the hope that it will allow me to…
1
vote
0 answers

Running in docker receive "The 'ClientId' option must be provided"

ASP.NET with Microsoft-identity-web. If run webapp locally using dotnet app.dll everything is ok, but if package into an image and run in docker or kubernetes, each request will occur error: fail:…
William
  • 97
  • 1
  • 8
1
vote
1 answer

Problems using Microsoft Identity Web App and Microsoft.AspNetCore.Identity in the same Web Project

In my currently application I need to use two different authentications: Microsoft.AspNetCore.Identity - with internal Identity tables for Customer users Microsoft Identity Web App - Azure AD authentication for Internal users of my Organization If…
1
vote
0 answers

Calling a secured Web API on behalf of another Azure App Service

We have a couple of ASPNET Core Web APIs that are accessed by both AzureAd and AzureB2C accounts. API1 is currently called by an ASPNET Core Site using Azure Ad user token. API2 is called by that same ASPNET Web Site and by API1. When API1 is called…
1
vote
2 answers

'AuthenticationBuilder' does not contain a definition for 'AddMicrosoftIdentityWebApp'

I'm attempting to add support for Graph into a .Net 6 application. I've previously used Graph in a .Net 5 application but I'm having some trouble understanding how to wire things up using the .Net 6 "simplified" startup. I've included both: using…
1
vote
1 answer

Why i'm getting "Bearer error="invalid_token"" in asp.net webapi?

I'm trying to make webapi which would use AAD SSO as auth provider. Microsoft OAuth endpoint generates right bearer ( tested at jwt.io ). But when i'm trying to access webapi endpoint with one i get HTTP 401 error with message "Bearer…
1
vote
0 answers

Adding Microsoft.Identity.Web to .Net 6 Blazor Webassembly (standalone) app cause an error

I try to add the package Microsoft.Identity.Web to a Blazor Webassembly (standalone) application in .NET 6 and I am getting the error: "There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier…