adal

.Net Core 1.1 with ADAL: The dependency NetStandard.Library >= 1.6.0 could not be resolved

萝らか妹 提交于 2019-12-12 03:53:37
问题 I'm trying to use ActiveDirectory client on my NetCore 1.1 project. Project restores fine, but doesn't build. When building I get an error The dependency NetStandard.Library >= 1.6.0 could not be resolved that points to Microsoft.IdentityModel.Clients.ActiveDirectory Why can't this dependency be satisfied? Library used to work before upgrading from NetCore 1.0.1 Here is my project.json (which contains lot's of extra stuff trying to resolve the problem): { "dependencies": { "Microsoft

OneDrive API - Refer to Sharepoint file to upload or download - invalid audience error

笑着哭i 提交于 2019-12-12 03:48:02
问题 I want to programatically interact with files in Office 365 E3 Sharepoint Site. I am using Azure AD and ADAL Python library to authenticate access to Sharepoint Site file. import adal import urllib import requests import urllib2 ## set variables username = 'curtis@tenant.onmicrosoft.com' password = 'OFoarry8Oe$' authorization_url = 'https://login.windows.net/tenant.onmicrosoft.com' # Authority redirect_uri = 'https://login.microsoftonline.com/login.srf' client_id = 'dcbf844f-d2c3-42d1-8a7d

How do I test a Azure AD protected Web API in with Visual Studio Test Adapter?

℡╲_俬逩灬. 提交于 2019-12-12 03:29:37
问题 I've created a multi tenant Web API that works just fine. Now I want to build a native client for testing. The Web API app is defined in one tenant. The test app is defined in another tenant that has given admin consent to the Web API. I want to use the native app to authenticate with username and password in my (non-interactive) integration tests. I cannot use certificate/app-only authentication because I need a real user context. Getting a token var userCredential = new UserCredential(

ADAL.Net TokenCache throwing server timeout error with 500 error code

主宰稳场 提交于 2019-12-12 02:18:14
问题 I am trying to integrate WS-Federation in my Asp.Net MVC app using OWIN. I followed the github samples and it is working as expected. Now I want to take this one step further and call an external WebApi hosted on different Azure web app from within my website. I couldn't find any WS-Fed samples for this scenario. WebApi needs an access token to provide access to protected resources. In one of my MVC controllers I tried using ADAL.Net code to acquire the access token but i get timeout error.

ADAL For Java on Mobile Devices: Prompt is Not Allowed

北慕城南 提交于 2019-12-12 02:17:13
问题 I've a Java program using ADAL4J that works great on a non-mobile device but when deployed to any mobile devices via Oracle MAF (which deploys as Cordova, HTML5, CSS), it fails on the AuthenticationContext method. The error is: com.microsoft.aad.adal.AuthenticationException: Prompt is not allowed and failed to get token: Here is the main code: service = Executors.newFixedThreadPool(1); String url = AUTHORIZATION_ENDPOINT + tenantId + "/oauth2/authorize"; //Next line is where it fails

AcquireTokenAsync fails in a UWP app

六月ゝ 毕业季﹏ 提交于 2019-12-11 19:33:27
问题 I'm using ADAL in my Win10 UWP app. Here is a snippet of code: // WinRT, UWP app. Doesn't work TokenCache TC = new TokenCache(); authContext = new AuthenticationContext(authority, true, TC); var authresult = await authContext.AcquireTokenAsync(resourceUri, clientID, new Uri(redirectUri)); token = authresult.AccessToken; Sometimes it fails with the following error, without ever bringing up the auth window: authentication_ui_failed: The browser based authentication dialog failed to complete.

ADAL for Windows Store SSO

两盒软妹~` 提交于 2019-12-11 18:42:13
问题 How do I implement SSO with ADFS? I try to setup SSO from a Windows Store App that is deployed locally with a Developer license on a Tablet that is domain joined (Win 8.1 Pro) but the login dialog of ADFS is shown. I would like that SSO takes over and that the token is automatically provided by the authenticationContext.AcquireTokenAsync method. The ADFS is deployed to federate an on-premise Active Directory. Any help is welcome. 回答1: http://www.cloudidentity.com/blog/2014/07/10/adal-v2-and

Microsoft Azure login fails in electron app

℡╲_俬逩灬. 提交于 2019-12-11 15:44:14
问题 I am trying to integrate Microsoft Azure AD login functionality using ms-adal-angular6. This project is on Angular-6 to create a desktop application using Electron. Everywhere the login works fine except when I create the *.exe file because it has a file:// URL system. Below is the login failed screen after entering correct OTP during the login process. I tried adding a file://* Reply URL under portal.azure.com -> Azure Active Directory -> App registrations -> Settings(of one app) -> Redirect

Azure AD authentication with Institutional and Microsoft accounts

被刻印的时光 ゝ 提交于 2019-12-11 12:36:08
问题 I have a custom MVC WebApplication with WebApi-service that require authentication/authorization. I followed the example on GitHub WebApp-WebAPI-OpenIDConnect-DotNet. While developing I created a new test directory on my personal Azure subscription and everything worked perfectly fine. I could add institutional accounts (like jon@mytenantname.onmicrosoft.com) and existing Microsoft accounts (jon@hotmail.com) and assign them to different groups. When a user typed in a liveID email address on

ADAL for Java Proxy

泪湿孤枕 提交于 2019-12-11 12:17:08
问题 I'm trying to add authentication through Azure AD in my app and for this purpose I select adal4j, because it's official library. But I surprised that this library doesn't support proxy(or am I wrong?). So, Does exist any workaround? 回答1: There are two ways support proxy for Java. Command Line JVM Settings: The proxy settings are given to the JVM via command line arguments: java -Dhttp.proxyHost=proxyhostURL -Dhttp.proxyPort=proxyPortNumber -Dhttp.proxyUser=someUserName -Dhttp.proxyPassword