adal

Group claims with Azure AD and OAuth2 implicit grant in ADAL JS

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 11:44:00
Background We are developing a multi-tenant SaaS product in Azure which has an AngularJS front-end and Web API back-end. We use Azure AD for authentication and have hooked it up with ADAL JS (using the OAuth2 implicit grant). Being a multi-tenant application, we allow customers to authenticate against their own Azure AD (which may or may not be connected to an on-premise AD). So far this all works nicely. ADAL JS takes the user to the Azure login page and once the user has authenticated, an OAuth2 token is issued. This JWT token is then sent with all API calls as a bearer token where we have

Create a new user in Azure Active Directory (B2C) with Graph API, using http post request

◇◆丶佛笑我妖孽 提交于 2019-11-30 05:05:53
问题 I have previously been adding users programmatically using Active Directory Authentication Library (ADAL), but now I need to define "signInNames" (= users email), and that doesn't seem to be possible with ADAL (please tell me if im wrong). Now I'm trying to add a new user (local account) programmatically using HTTP POST, following the documentation on MSDN. //Get access token (using ADAL) var authenticationContext = new AuthenticationContext(AuthString, false); var clientCred = new

Group claims with Azure AD and OAuth2 implicit grant in ADAL JS

社会主义新天地 提交于 2019-11-29 17:53:27
问题 Background We are developing a multi-tenant SaaS product in Azure which has an AngularJS front-end and Web API back-end. We use Azure AD for authentication and have hooked it up with ADAL JS (using the OAuth2 implicit grant). Being a multi-tenant application, we allow customers to authenticate against their own Azure AD (which may or may not be connected to an on-premise AD). So far this all works nicely. ADAL JS takes the user to the Azure login page and once the user has authenticated, an

ADAL JS - response_type=“token” is not supported

孤者浪人 提交于 2019-11-29 16:29:06
问题 I'm using adal js to auth with Azure AD. I have webApp and webApi. Pretty much my apps follow this sample https://github.com/AzureADSamples/SinglePageApp-WebAPI-AngularJS-DotNet . I was able to login to my webApp and adal.js successfully acquired a token for my webApi and injected it into a request. All was working until recently. Then token acquisition for webApi stopped working with error: "response_type 'token' is not supported for the application" renewToken is failed:AADSTS70005:

How to authenticate without prompt to CRM Dynamics Online webservices with ADAL, NetStandard, and Azure AD

梦想的初衷 提交于 2019-11-29 12:05:18
I'm currently trying to create a Xamarin App in order to get some info from a Dynamics 365 online instance. The code that authenticate with AD and access the CRM api is deported in a NetStandard (v1.6) Library. I use the following NuGets : Microsoft.IdentityModel.Clients.ActiveDirectory (3.13.9) NETStandard.Library (1.6.1) I followed the following tutorial in order to link AD with my Dynamics instance : https://nishantrana.me/2016/11/13/register-a-dynamics-365-app-with-azure-active-directory/ Here is my ActiveDirectory helper : public static class ADHelper { public async static Task

Client-credentials don't work for powerBI REST API

a 夏天 提交于 2019-11-29 08:50:32
I'm trying to implement the daemon authentication flow. The following post request returns me an access token with the right scope: p_url = 'https://login.microsoftonline.com/' + 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' + '/oauth2/token' data = { 'grant_type':'client_credentials', 'client_id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'client_secret': 'L------------------------------------------=', 'resource':'https://analysis.windows.net/powerbi/api' } r = requests.post(url=p_url, data=data) I receive the following response { "access_token" : "ey------------" "expires_on" : "1454857253", "not

ADAL.NET v3 does not support AcquireToken with UserCredential?

[亡魂溺海] 提交于 2019-11-28 09:51:57
In ADAL.NET 2.x, we use the below code to acquire token from Azure AD using UserCredential and it works perfectly: var authContext = new AuthenticationContext(Authority); var userCredential = new UserCredential(username, password); var token = authContext.AcquireToken(ResourceUrl, ClientId, userCredential); When I upgraded ADAL.NET v3 today, the code cannot be compiled anymore because on the new version, UserCredential does not have overloaded constructor with username and password. How I can workaround this with the new version of ADAL.NET v3? Kanishk Panwar Use UserPasswordCredential class

How to integrate azure ad into a react web app that consumes a REST API in azure too

时光总嘲笑我的痴心妄想 提交于 2019-11-28 07:39:54
I have one web app which is React, and I already configured Azure AD Authentication for the web app itself. Its 100% Client site app, no server side components. I used this component: https://github.com/salvoravida/react-adal My code is as follows: adalconfig.js import { AuthenticationContext, adalFetch, withAdalLogin } from 'react-adal'; export const adalConfig = { tenant: 'mytenantguid', clientId: 'myappguid', endpoints: { api: '14d71d65-f596-4eae-be30-27f079bf8d4b', }, cacheLocation: 'localStorage', }; export const authContext = new AuthenticationContext(adalConfig); export const

Microsoft.Owin.Security.OpenIdConnect with Azure Active Directory authentication ticket lifetime

半腔热情 提交于 2019-11-28 03:05:56
问题 I am building a multi tenant web app that connects Office 365 services using Microsoft.Owin.Security.OpenIdConnect, Version=3.0.0.0 and Azure Active Directory with Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.19.0.0 following this sample. Our web app client (user agent) is authenticated to our server using an asp.NET cookie while the authentication between our server and authority server (Azure AD here) is made with OpenID Authorization Code Flow. We set for the Asp.NET cookie a

Client-credentials don't work for powerBI REST API

試著忘記壹切 提交于 2019-11-28 02:14:38
问题 I'm trying to implement the daemon authentication flow. The following post request returns me an access token with the right scope: p_url = 'https://login.microsoftonline.com/' + 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' + '/oauth2/token' data = { 'grant_type':'client_credentials', 'client_id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'client_secret': 'L------------------------------------------=', 'resource':'https://analysis.windows.net/powerbi/api' } r = requests.post(url=p_url, data=data) I