msal

Postman gets a valid token but getting 401 from API

a 夏天 提交于 2020-03-26 04:29:07
问题 I am trying to test my ASP.NET Core 2.2 Web API with Postman. My API is protected by Azure AD. I have been using the "Web App your API" Microsoft Azure Sample on GitHub and triple-checked all of the steps. Using Postman I ask it to get a token using the OAuth2 Implicit flow and I do get a token returned. If I decode the token it seems to contain all the claims I want: aud , upn and scp all make sense. However, when I then send a request to the API using the returned token I still get a 401.

Unable to obtain configuration from Azure AD B2C

允我心安 提交于 2020-03-25 12:31:08
问题 Following this tutorial by Microsoft, the JavaScript application is not able to access the API protected by Azure AD B2C. The application is able to login/authenticate, but when clicking the Call Web API button, the following message is output onto the page: Web APi returned: "AuthenticationFailed: IDX10803: Unable to obtain configuration from: 'https://b2c-tenant-name.microsoftonline.com/tfp/b2c-tenant-name.onmicrosoft.com/B2C_1_signupsignin/v2.0/.well-known/openid-configuration'." How can

Azure AD Multi Tenant ,.Net Core Web API with JWT Token

妖精的绣舞 提交于 2020-03-22 12:53:18
问题 So I raised this question Azure AD Multi Tenant ,.Net Core Web API with MSAL(Microsoft Authentication Libary) which showed me how to turn on the error output. Why would I be getting this now with my token, at a guess is the aud right and the iss for a multi tenant ad token? AuthenticationFailed: IDX10511: Signature validation failed. Keys tried: 'Microsoft.IdentityModel.Tokens.X509SecurityKey, KeyId: 'YMELHT0gvb0mxoSDoYfomjqfjYU', InternalId: '2c34a300-21bb-4eb1-b3b9-1944f1be7470'. , KeyId:

Access token in React app SSO hosted in a Dynamics 365 web resource

纵饮孤独 提交于 2020-01-30 08:45:08
问题 I have a Reactjs app (aka Single-page Application) that is uploaded in Dynamics 365 Customer Engagement (formerly CRM) as a web resource. This web resource or app is displayed in an IFRAME inside an entity form and therefore this small app already has direct access to Dynamics 365 data using the Xrm object. All good. What I'm trying to accomplish with this app is to get it to connect to SharePoint via Microsoft Graph API and upload files and create folders. Since the user is already signed in

Display Azure AD B2C Sign In Android Emulator

ⅰ亾dé卋堺 提交于 2020-01-25 06:55:07
问题 I'm testing using Azure AD B2C with Xamarin.Forms, specifically with the sample found here: https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/webservices-azureadb2cauth/ The code seems to working fine. All is working with UWP as expected. Haven't tested IOS yet. On my Android Emulator, when I click the Login button, the Chrome window opens and I get a blank page. The Debug window shows the following: [ERROR:gl_surface_egl.cc(335)] eglChooseConfig failed with error EGL

How do you read Roles/Permissions using MSAL-ANGULAR

℡╲_俬逩灬. 提交于 2020-01-25 00:25:07
问题 So I've successfully integrated Azure AD authentication in my angular site as per the instructions in msal-angular and now I'm at the point where I'm looking to define and leverage roles and permissions to provide more granular control of what a user can and can't do. From what I've been able to determine I can define roles by following this set of instructions (https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/app-roles) but msal-angular doesn't seem to expose this

How do I configure MSAL in Angular?

♀尐吖头ヾ 提交于 2020-01-24 15:34:27
问题 I would authenticate to Azure using Azure AD library for Angular. Here's my msalModule MsalModule.forRoot({ clientID: "ClientTenantID", authority: "https://login.microsoftonline.com/common", redirectUri: "http://localhost:4200/", consentScopes: [ "user.read", "ClientID/access_as_user"], popUp: true, unprotectedResources: ["https://www.microsoft.com/en-us/"], protectedResourceMap: protectedResourceMap, logger: loggerCallback, correlationId: '1234', level: LogLevel.Info, piiLoggingEnabled: true

redirect_uri_mismatch Azure AD B2C with angular using MSAL

五迷三道 提交于 2020-01-24 04:19:06
问题 While using loginRedirect() OR acquireTokenRedirect() , I am getting below given error: redirect_uri_mismatch:AADB2C90006%3a The redirect URI 'http%3a%2f%2flocalhost%3a4200%2fsubscription' provided in the request is not registered for the client id 'blah-blah-blah'. Correlation ID%3a 29978079-45a7-4f85-a9bf-4cde9d3adc84 Timestamp%3a 2017-09-29 05%3a32%3a22Z Note: client id is same which I am using in my tenant config as well as configured in Azure. Please let me know why I am getting a

Test Broadcast Service

会有一股神秘感。 提交于 2020-01-16 12:31:26
问题 Hi I am trying to write angular code for a component with an observable but I can't test the broadcast service. I get an error saying the service is not being called. How Should I access the service? Any help would be appreciated. Thank you. This is my component with the observable: ngOnInit(): void { this.subscription.add( this.broadcastService.subscribe('msal:acquireTokenSuccess', (payload) => { // do something here this.roleService.checkServerEventReviewers().subscribe(res => { this

Extend MSAL to support multiple Web APIs

限于喜欢 提交于 2020-01-15 03:07:46
问题 Hi I started with the sample here https://github.com/Azure-Samples/active-directory-b2c-dotnet-webapp-and-webapi And manqaged to get the TaskWebApp talking to the TaskService. I now want to extend the solution to have a 3rd service Im not sure if the problem is within the ConfidentialClientApplication as when it fails to get my tokens i get no exception. I think the issue is the COnfigureApp method in my TaskWebApp is only expecting to manage tokens from the single TokenService. Here is my