msal

How to open Android Outlook application from an external one

可紊 提交于 2020-07-18 05:25:59
问题 I'm currently developing an Android application in order to display home screen widgets. Those ones are related to Microsoft Outlook (Events + Messages) in order to show incoming events and unread new messages in a kind of dynamic tiles. The Msal graph library helps me a lot to authenticate and retrieve in formations which contains an identifier for each event / message results But now I want to know if the outlook application is installed on the user device and if there is a way to open

How can I pass a custom value to Azure AD B2C and need to return that parameter along with the response or with the common Redirect URI?

纵饮孤独 提交于 2020-07-10 07:35:41
问题 I have to handle multiple login pages/applications which need to redirect to a common landing page index.html and need to access custom string to identify the requested application. The token generation endpoint is common for all login pages. Scenario : I have multiple login pages 1: Login1.html 2: Login2.html Token generation endpoint will be same for both logins page. After successful authentication from Azure AD B2C application it will redirect to a common landing page 'http://localhost

Checking Azure Active Directory group membership via MSAL in a SPA + Web APIs

时光怂恿深爱的人放手 提交于 2020-07-09 12:28:08
问题 I am building an application which has a front-end (a SPA built with Vue.js) which interfaces to a couple json-based Web APIs in the back end (hosted in Azure). The Web APIs need to be secured via Azure Active Directory and users must be a member of a security group. Furthermore, the SPA should simply try to force the user to sign into an approved account if they are not signed in as one (i.e. just auto-redirect). I actually have all this working. The AAD application has Group.Read.All, the

Authenticating against Microsoft Graph with SPA and then using token in Web API

筅森魡賤 提交于 2020-07-07 11:41:04
问题 I have an SPA that authenticates a user, by using msal.js, against an app registrered at the Application Registration Portal. It successfully retrieves a token and everything is fine so far. Then I have a ASP.NET Web API setup that should use the token from the SPA to make requests to Microsoft Graph on behalf of the user and this is where I run into trouble. So far I've set up a OWIN middleware on the API that should validate the token before making a request to the graph but no matter what

Creating a single instance of a class within a Vue application

主宰稳场 提交于 2020-06-27 10:15:09
问题 I'm new to Vue and I'm struggling to wrap my head around how to implement what seems to me like a good case for a global variable or singleton. The background is that I'm using Azure AD B2C for authentication with the MSAL library. MSAL requires a single instance of the Msal.UserAgentApplication to be declared and then shared through the application. What I'm struggling with is how to declare that instance somewhere central and then access it from each component including the router. At the

MSAL.Net No account or login hint was passed to the AcquireTokenSilent call

别等时光非礼了梦想. 提交于 2020-05-17 07:06:27
问题 I have seen many same or similar questions, and tried all their answers if there was one, but none of those works for me. I'm using this example from Microsoft's Github account as my project base. It works well for just signing in users. The project has 1 WebApi, 1 Angular App. Then I followed this Microsoft example to add code to call Graph API. Here is the controller code: [Authorize] [Route("api/[controller]")] [ApiController] public class BillsController : ControllerBase { static readonly

MSAL.Net No account or login hint was passed to the AcquireTokenSilent call

不羁的心 提交于 2020-05-17 07:05:19
问题 I have seen many same or similar questions, and tried all their answers if there was one, but none of those works for me. I'm using this example from Microsoft's Github account as my project base. It works well for just signing in users. The project has 1 WebApi, 1 Angular App. Then I followed this Microsoft example to add code to call Graph API. Here is the controller code: [Authorize] [Route("api/[controller]")] [ApiController] public class BillsController : ControllerBase { static readonly

Calling an Azure AD secured Web API from Angular Frontend

雨燕双飞 提交于 2020-05-15 08:28:05
问题 I am currently developing an Angular Frontend, which uses MSAL to authenticate users. This Frontend should call a Web-API (also hosted in Azure), which is secured by Azure Active Directory. While I easily managed to work with Angular and MSAL, getting a Token and successfully calling Graph/me as test, I cannot get the API call to work, I'm always receiving 401's. I'm using the following setup: Angular frontend with MSAL I created an Application in AAD, gave it User.Read permissions for MS

Application does not fetch access token from cache using MSAL (react-aad-msal)

泪湿孤枕 提交于 2020-04-30 11:47:08
问题 authProvider.getAccessToken() calls the authentication endpoint for every API call, instead of fetching it from the cache. I don't know if the issue is with AcquireTokenSilent in Msal or getAccessToken in react-aad-msal. Using msal 1.2.1 and react-aad-msal 2.3.2 Api call helper: import { config } from '../config'; import { authProvider } from './../authProvider'; export const callApi = async (method: 'GET' | 'POST' | 'PUT' | 'DELETE', path: string, data?: any) => { const token = await

Application does not fetch access token from cache using MSAL (react-aad-msal)

谁说我不能喝 提交于 2020-04-30 11:43:21
问题 authProvider.getAccessToken() calls the authentication endpoint for every API call, instead of fetching it from the cache. I don't know if the issue is with AcquireTokenSilent in Msal or getAccessToken in react-aad-msal. Using msal 1.2.1 and react-aad-msal 2.3.2 Api call helper: import { config } from '../config'; import { authProvider } from './../authProvider'; export const callApi = async (method: 'GET' | 'POST' | 'PUT' | 'DELETE', path: string, data?: any) => { const token = await