azure-activedirectory-library-for-dotnet | ADAL authentication libraries for .net | Android library
kandi X-RAY | azure-activedirectory-library-for-dotnet Summary
kandi X-RAY | azure-activedirectory-library-for-dotnet Summary
This library, ADAL for .NET, will no longer receive new feature improvements. Instead, use the new library MSAL for .NET.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of azure-activedirectory-library-for-dotnet
azure-activedirectory-library-for-dotnet Key Features
azure-activedirectory-library-for-dotnet Examples and Code Snippets
Community Discussions
Trending Discussions on azure-activedirectory-library-for-dotnet
QUESTION
this one has kept me busy for the past day.
I'm trying to use Azure Key Vaults service from my .net core 2.2 app using a certification as security.
I'm installing the certificate within the same code on the startup of an application, using a base64 encoded string as input parameter.
When installing in the StoreLocation.LocalMachine
(and running VS as admin) the application works fine and the secrets are retrieved.
When using StoreLocation.CurrentUser
, the application throws a NullReferenceException
when trying to retrieve the secrets from the vault.
ANSWER
Answered 2019-Sep-16 at 15:13While I was writing up the GitHub readme file for this problem's example, I stumbled upon the solution.
It pains me to say that it was a human error...
I was passing in a wrong Base64String for the certificate. Probably one that I created earlier.
When passing in the correct generated string in the command, the code started working. You can see it on my GitHub
In short it was failing because the certificate I used on the client did not correspond with the one on the server. Though the exception could be clearer.
QUESTION
I have Xamarin.Forms application that authenticates user against Azure AAD using ADAL (Microsoft.IdentityModel.Clients.ActiveDirectory
). That all works fine but on Android, device orientation looses user email on the Microsoft authentication screen.
Here I am in Portrait mode and I have entered user email:
Clicking on Next lands on screen asking to enter password. If I now rotate device on Android, it will return me back to blank screen above, user email I entered above is lost:
Device rotation should not return user back and re-prompt for user email again. It should stay on password prompt.
How do I prevent the rotation from re-prompting for user email? I dont want to disable rotation, I just want to prevent it from returning me back to screen that prompts for user email again.
This is Xamarin.Forms application and my MainActivity has already ConfigChages.Orientation
attribute like below; however, this is not solving the issue:
ANSWER
Answered 2019-Jul-02 at 07:47I use Entry at my side, adding ConfigurationChanges = ConfigChanges.ScreenSize| ConfigChanges.Orientation, it works fine.
If you still have this issue, I suggest you can follow the next steps:
1.on Forms PCL, you can override OnSizeAllocated to check screen orientation, like this:
How to detect screen orientation of the device in Xamarin.Forms?
2.On Forms PCL and Android, you can use MessageCener to subscribe and send data
3.override method onSaveInstanceState() and onRestoreInstanceState(), like this:
QUESTION
I have an ASP.NET MVC application with Identity 2 authentication that is deployed as an Azure App. What I am trying to do is use Azure Active Directory Authentication within this App so that users created in the Active Directory (this AD was created within the same subscription of Azure that the App resides on) can authenticate in the App.
With standard Active Directory I would use LDAP(S) protocol for authentication with Domain Controller but in Azure AD I was told to use ADAL library since LDAP protocol is not supported(?).
I have reviewed a number of implementations of ADAL but I am not sure of the exact flow of actions that need to be performed.
From the official Github repo I reviewed the AdalDesktopTestApp
project and summed up the authentication mechanism as following:
ANSWER
Answered 2019-Jul-22 at 01:04Yeah LDAP is not supported. You need to use OAuth / OpenID Connect, which are made easier with ADAL or MSAL (this is newer and works with the v2 endpoint).
Client id is the id of your registered application in Azure AD.
It is also referred to as application id sometimes.
The Resource identifies what you want to call.
The resource in the sample is the identifier for Azure AD Graph API.
You'd use e.g. https://graph.microsoft.com
for the newer Microsoft Graph API.
The access token you acquire is only valid for that API.
Note that MSAL / v2 does not use a resource, instead it uses scopes.
The URL with "common" is your authority.
This says what accounts you want to allow to login to your app.
Common allows users from any Azure AD tenant to login to your app.
(your app needs to be multi-tenant then as well)
If you want to support only a specific Azure AD tenant, specify it as https://login.microsoftonline.com/your-aad-tenant-id
.
To keep it multi-tenant, set it as https://login.microsoftonline.com/common
.
You are using the less secure resource owner password credentials grant flow in the app. You should use overloads that pop up a Web browser that allows the user to login properly. In your app, users with MFA will be unable to login, for example.
QUESTION
We are currently using the adal python library, and wanted to know if there is any way (or plans of implementing a way) to use the signed in user (windows) for a federated authentication flow.
Such a flow is possible using .Net package link
The end goal would be, instead of acquire_token_with_username_password
, maybe something like acquire_token_with_signed_in_user
?
ANSWER
Answered 2019-Apr-08 at 15:04You are able to get an accessToken and refreshToken by using acquire_token_with_username_password method. As per the below documentations, there is no such method for acquiring the token with signed in user but you can use acquire_token_with_refresh_token to get a new access token by using the refresh token that you got in the first call. You can use TokenCache class to cache accessToken and refreshToken.
Refresh Token in adal python and https://adal-python.readthedocs.io/en/latest/
I hope this helps.
QUESTION
I am trying to use AzureAD (mono only) to authenticate as an AD app-user to make requests to SharePoint.
The Azure AD app user basically requires you provide [clientID, certificate path, certificate password].
The following code works on Windows:
...ANSWER
Answered 2018-Jul-25 at 01:05See my comment here: https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/issues/509
I have gotten the work-around to work for SharePoint Online now:
You can remove the CorePNP library if you want. But do not use the OfficeDevPnP.Core.AuthenticationManager for Linux because it won't work! That library does work great for Windows however.
Add nuget dependencies:
QUESTION
Cheers,
I'm looking for some clarification regarding authentication libraries for use with Azure AD, particularly regarding the differences between Microsoft.AspNetCore and Microsoft.IdentityModel based libraries.
I am implementing an Api in .net core for which authentication will be managed with Azure Active Directory (AAD). Based on the needs of the application I am looking to use the original (v1) endpoint with ADAL rather than the v2 endpoint due to some features not being available with the v2 endpoint at this time (RBAC and groups). All indications are that the ADAL libraries are the way to go, but this does not sync up with the following:
When I create an .net core (v2) API project in Visual Studio 2017 (v15.6.3) and I select Work or School Accounts for authentication, I get the following dialog which indicates that this choice is for
applications that authenticate users with Active Directory, Microsoft Azure Active Directory
Yet when the project is created, ADAL libraries, (nor MSAL for that matter), are not included in the project. In fact, the libraries referenced in the project are
Additionally, the project template builds out a static extension class AzureAdServiceCollectionExtensions for handling the work and school authentication particulars with Azure AD, (note that if you choose a authentication with a personal account, a different extension class is created, but still azure based).
But these are not the ADAL.net classes which are in this package
Microsoft.IdentityModel.Clients.ActiveDirectory
The AspNetCore packages are published by the Asp.Net team, while the ADAL package is published by the AzureAD team.
Finally I get to some questions:
Why are the ADAL (or even the MSAL) libraries not part of the templates for integrating with Azure AD?
Do the templates indicate the preferred approach to integrating with Azure AD, and by implication to use the AspNetCore libraries?
All the documentation I have read so far for integrating with Azure AD involved ADAL or MSAL, have I missed something with the AspNetCore libraries?
Note that I did search for project templates which use ADAL or MSAL, no luck.
Thanks in advance.
ANSWER
Answered 2018-Apr-08 at 19:49ADAL and MSAL are the libraries needed for requesting and managing tokens. If you're building an API that protects it's endpoints and requires an access token to access, you likely only need to use the .NET core middleware (what was included in the template). This middleware accepts and validates incoming access tokens.
The only case you'll need to integrate ADAL or MSAL into your app is if you're interested in doing the On-behalf-of flow from your web API.
Here's a code sample that implements this middleware in an .NET core API.
QUESTION
Recently, I faced with the following behavior of the ADAL for .NET, which is specific for this environment: Windows 10 + a corporate active directory.
...ANSWER
Answered 2017-Mar-14 at 19:45PromptBehavior.Auto
will try to use an active token, but if not will show the login page if the refresh token is invalid/expired or credentials are required. You likely have a session that needs to be re-authenticated for one reason or another, and are getting prompted to sign in again for the user in the cache. If you're domain joined on the Win 10 device, it will automatically use that user.
You should be able to hit the Use another account
button to sign in a different user. Alternatively, you can use PromptBehavior.Always
which will ignore the cache and allow you to sign in a fresh user.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install azure-activedirectory-library-for-dotnet
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page