active-directory

Active Directory authentication with NodeJS

人盡茶涼 提交于 2020-05-13 04:44:46
问题 I'm trying to build one NodeJS server and planning to use the organization's Microsoft Active Directory for authentication. I tried the same with many packages (activedirectory, activedirectory2, ldapjs etc.) But none of them seems to work for me. I'm supplying the LDAP URL and below is my code. var ldapjs = require('ldapjs'); var config = { url: 'ldap://mycompany.com/dc=mycompany,dc=com' ,timeout: 10 ,reconnect: { "initialDelay": 100, "maxDelay": 500, "failAfter": 5 } } var username = "user

Is Active Directory not supporting Authorization Code Flow with PKCE?

扶醉桌前 提交于 2020-04-30 04:38:52
问题 I tried to use the currently recommended Authorization Code Flow with PKCE to gather an access token from Active Directory. The client will be a public Angular SPA which is the reason for the chosen flow. Gathering the openid-configuration form AD as well as the Authorization Code for a user worked well. But I fail requesting the access token from the following endpoint: https://login.microsoftonline.com/{tenantId}/oauth2/token. I tried to reconstruct the request in Postman: POST /7e8c2868

How to set custom claims to aad token using C# code

纵然是瞬间 提交于 2020-04-17 19:10:52
问题 I have a webapi which generates aad token and I have written token generation logic in Get() method in webapi. I'm able generate aad jwt token from webapi get() method but, now I want to include some custom claims into the token. How can I set custom claims to aad token using c#. I have used below code for generating aad token. var authenticationContext = new Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext("https://login.windows.net/" + ConfigurationManager.AppSettings[

How to do a paged search on an Ldap server using Novell.Directory.Ldap.NETStandard and Simple Paged Results control?

梦想与她 提交于 2020-04-15 17:36:47
问题 I'm trying to do a paged search in an Active Directory using Novell.Directory.Ldap.NETStandard (https://github.com/dsbenghe/Novell.Directory.Ldap.NETStandard) and Simple Paged Results control (https://ldapwiki.com/wiki/Simple%20Paged%20Results%20Control). First page works fine but the second one throws "Unavailable Critical Extension" on the searchResult.next() line. When looking in the event log for ActiveDirectory I found: 00000057: LdapErr: DSID-0C090809, comment: Error processing control,

How to connect to Active Directory via LDAPS in C#?

三世轮回 提交于 2020-04-11 12:59:23
问题 Found a documentation (here) in an answer thread on this site but i can´t get an connection to an AD. When i use a program like Active Directory Explorer i can connect. I think, because i am trying to connect to a LDAPS i need a different approach? I have the server IP, a domain, username/pwd and the port 636. I tried various combinations @ new DirectoryEntry but couldn´t get it to connect. Always get a COMException Domain is not existing . static DirectoryEntry createDirectoryEntry() {

How to connect to Active Directory via LDAPS in C#?

岁酱吖の 提交于 2020-04-11 12:58:49
问题 Found a documentation (here) in an answer thread on this site but i can´t get an connection to an AD. When i use a program like Active Directory Explorer i can connect. I think, because i am trying to connect to a LDAPS i need a different approach? I have the server IP, a domain, username/pwd and the port 636. I tried various combinations @ new DirectoryEntry but couldn´t get it to connect. Always get a COMException Domain is not existing . static DirectoryEntry createDirectoryEntry() {

AD vs ADFS vs LDAP: Explain it like I'm 5

烈酒焚心 提交于 2020-04-09 05:18:32
问题 I don't work with Microsoft but I'm struggling understanding conceptually how AD, ADFS and LDAP work together. Let's say I have an application that needs an Identity Provider. How does AD and LDAP come into play? My googling hasn't come up with a clear summary of these concepts for me, but if there is a resource that exists, please do point me towards it. 回答1: AD and LDAP contain user attributes e.g. first name, last name, phone number. They also contain a user login and password and roles

How to use Active Directory Authentication in ASP.NET Core?

夙愿已清 提交于 2020-04-05 15:24:14
问题 I am using the ASP.NET Core 2.1 React SPA Microsoft template. I want to use Active Directory for user authentication. Our server runs on a corporate network using Active Directory domain identities. How can I do it? 回答1: The best way is to use Windows authentication. However, that will only work if the server you run this on is joined to the domain (or a trusted domain). If not, then you will have to use Forms Authentication, where the user enters their username and password, and you

How to use Active Directory Authentication in ASP.NET Core?

自闭症网瘾萝莉.ら 提交于 2020-04-05 15:23:50
问题 I am using the ASP.NET Core 2.1 React SPA Microsoft template. I want to use Active Directory for user authentication. Our server runs on a corporate network using Active Directory domain identities. How can I do it? 回答1: The best way is to use Windows authentication. However, that will only work if the server you run this on is joined to the domain (or a trusted domain). If not, then you will have to use Forms Authentication, where the user enters their username and password, and you

Read msExchResourceMetaData property of a UserID

百般思念 提交于 2020-03-28 06:43:02
问题 How to read msExchResourceMetaData property from Active Directory of an userID. I need to determine if the entered ID is not of type ROOM. I need to acheive this using C# without powershell script. 回答1: This blogpost fixed my issue. Thanks to Glen. http://gsexdev.blogspot.com.au/2007/04/webservice-to-find-room-and-equipment.html 来源: https://stackoverflow.com/questions/36704536/read-msexchresourcemetadata-property-of-a-userid