adal

How do I setup a valid on-premise ADFS URI?

送分小仙女□ 提交于 2019-11-28 00:18:55
I have a .NET 4.6.2 Windows client application which needs to get an authentication token from our on-premise ADFS server and use it to call an ASP.NET Core REST API. It's client name, id (GUID) and re-direct URI have been registered with ADFS. I am using the latest ADAL (v3.13) library to facilitate the authentication. I am attempting to get a token as demonstrated in the ADAL sample code like this: AuthenticationContext authenticationContext = new AuthenticationContext("https://<adfs-sts-server>/<rest-api-host>", false); var result = authenticationContext.AcquireTokenAsync(<rest-api-resource

MSAL or ADAL library for use with Azure AD B2C and Xamarin

社会主义新天地 提交于 2019-11-27 20:40:13
As of October 2016, is it still the case that the Microsoft Authentication Library (MSAL - NuGet package: Microsoft.Identity.Client ) is the correct/only library to use with Xamarin (iOS/Android) and the Azure AD B2C service? This library (MSAL) is only available as an alpha and does not appear to be in a state of being actively maintained or developed (since April). There are indications that the Active Directory Authentication Library (ADAL - NuGet package: Microsoft.IdentityModel.Clients.ActiveDirectory ) is intended as Microsoft's "one-Azure-authentication-library-to-rule-them-all", and it

How can I authenticate to AAD and call the Graph API as a Native Client application with PowerShell?

社会主义新天地 提交于 2019-11-27 14:53:49
I am trying to do some very quick tests on Azure Active Directory, and I need a tool which will allow me to quickly authenticate to AAD, and make calls to the AAD Graph API. I have registered a Native Client application in my directory already, and I have set it up to have the appropriate permissions to call the AAD Graph API. I want to take a look at my AAD Token, and the output from the Graph API after my call. How can I use PowerShell to quickly accomplish this? Shawn Tabrizi >> See here for instructions on how to create a similar script for emulating a Daemon Client Application using the

ADAL v3: How to authenticate using UserPasswordCredential?

荒凉一梦 提交于 2019-11-27 13:48:56
ADAL v3 has the UserPasswordCredential class, but I cannot find a working implementation. There's no AcquireToken overload which accepts a UserPasswordCredential or UserCredential type. What is the correct way of performing the username&password flow in ADAL v3? This particular piece of code is using full .Net 4.5. If you were developing with client app, you can refer the code below to acquire the token: string authority = "https://login.microsoftonline.com/xxxx.onmicrosoft.com"; string resrouce = "https://graph.windows.net"; string clientId = ""; string userName = ""; string password = "";

What format is the exp (Expiration Time) claim in a JWT

时光毁灭记忆、已成空白 提交于 2019-11-27 11:29:54
问题 I am using ADAL library to get access token for a resource. Does anyone know what format is the expiration time in ? more specifically "exp" (Expiration time) claim . JwtSecurityToken class simply returns int32 after parsing. So, that is not a good indicator. Tried parsing it to TimeSpan and DateTime but the values are not 90 minutes apart. It's almost the same. This is what I get from fiddler for iat and exp claim (used https://jwt.io/ to parse the token) iat : 1475874457 exp " 1475878357

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

蹲街弑〆低调 提交于 2019-11-27 07:25:30
问题 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/

Get a list of groups that Azure AD user belongs to in claims

孤者浪人 提交于 2019-11-27 06:09:36
问题 I am authenticating users of my web api against Azure Active Directory. Now I want to get a list of groups that this user belongs. I changed application manifest to include "groupMembershipClaims": "All", but all this does is to add claim hasGroups but no group names. I granted all (8) Delegated Permissions to Windows Azure Active Directory for my app in the portal. 回答1: I've done exactly this. Let's call my Azure AD appication "AD-App". AD-App Permissions to other applications is set to;

Using ADAL C# as Confidential User /Daemon Server /Server-to-Server - 401 Unauthorized

徘徊边缘 提交于 2019-11-27 04:55:08
Refering to not answered Questions: 401- Unauthorized authentication using REST API Dynamics CRM with Azure AD and Dynamics CRM Online 2016 - Daemon / Server application Azure AD authentication error to Web Api and Dynamics CRM 2016 Online Rest API with client credentials OAuth flow I need a communication between an Web-Service in azure cloud and Dynamics CRM Online 2016 WITHOUT any loginscreen! The service will have a REST api which triggers CRUD operations on the CRM (also I will implement an authentification) I think this is called "Confidential Client" or "Daemon Server" or just "Server-to

How do I setup a valid on-premise ADFS URI?

不羁的心 提交于 2019-11-27 04:42:43
问题 I have a .NET 4.6.2 Windows client application which needs to get an authentication token from our on-premise ADFS server and use it to call an ASP.NET Core REST API. It's client name, id (GUID) and re-direct URI have been registered with ADFS. I am using the latest ADAL (v3.13) library to facilitate the authentication. I am attempting to get a token as demonstrated in the ADAL sample code like this: AuthenticationContext authenticationContext = new AuthenticationContext("https://<adfs-sts

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

痴心易碎 提交于 2019-11-27 01:53:51
问题 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: