Searching Computer Names from AD in MOSS 2007 - search

In MOSS 2007, I want to search/get Computer Names from Active Directory in SharePoint just like search users.

Assuming you want to retrieve these names programmatically:
As far as I know there is no SharePoint API to retrieve computer names from the AD.
Though there are methods on SPUtility to retrieve Users and Groups from the AD.
To query computer names you have to implement you own Ldap query:
Use the .Net types System.DirectoryServices.DirectoryEntry / System.DirectoryServices.DirecorySearcher to query against the AD.
If you were using .Net 3.5 you could use the types System.DirectoryServices.AccountManagement.ComputerPrincipal and System.DirectoryServices.AccountManagement.PrincipalSearcher to do so.

Related

REST API to manage users on Sharepoint

As a follow-up question to REST API to manage users on skype for business, I would like to understand how the Sharepoint Server User API differs from MS Graph API for Users. The Graph documentation indicates that we could use it to manage Sharepoint users the same way we would Office 365 users. However, there are standalone Sharepoint installations (like versions e.g. 2007, 2010, etc.,) which don't fall under Office 365 plans.
The Graph API Docs linked above says the User resource represents an "Azure AD user account". However, the Sharepoint User doc says it represents a "user in Microsoft SharePoint Foundation." Are these users entirely different from each other?
All we're looking to do is manage users for our clients some of whom have subscriptions to Office 365 and some who just use standalone Sharepoint setup. We are not bothered about application specific features like Accessing the sharepoint files, sites or even managing Word documents, Excel sheets, etc., So, does the Graph API support managing users in such cases as well?
That API is only for SharePoint 2013+
The user management REST API linked in your question is specifically for SharePoint 2013, and presumably works in SharePoint 2016 as well. This is regardless of whether the SharePoint environment is on premises or in the cloud.
Office 365 is currently a subset of SharePoint 2013/2016 in terms features and functionality.
Note that SharePoint 2007 and 2010 will not have this API.
SharePoint users and Azure AD accounts are not synonymous
Consider that SharePoint and AD can exist independently of each other.
SharePoint does not need to use Azure Active Directory for authentication. It can use a traditional on-premises or cloud-hosted Active Directory, or theoretically (starting with version 2010) can use any claims-based authentication provider aside from Active Directory.
SharePoint 2007 and 2010 could also support simple forms based authentication as well as custom authentication providers, but as noted previously, neither of those versions of SharePoint expose the REST API in question.
AD = Authentication; SharePoint User = Authorization
Azure AD is a claim provider. A claim provider is used for authentication; when you log on to SharePoint, SharePoint relies on Active Directory to determine that you are who you say you are. A user's SharePoint account is used for authorization; the SharePoint account is granted access to content within SharePoint on a site by site basis.
Information in AD vs information in SharePoint
When using Azure AD for authentication, there are usually some areas of overlap between the data in SharePoint and the data in AD.
SharePoint's user profile service is usually set up to synchronize data from Active Directory to SharePoint, so that AD serves as the master data set for things like user display name and title. However, not all information is necessarily sync'd from AD to SharePoint, and additional information can be tacked on to SharePoint user profiles.
Group Membership in AD vs Group Membership in SharePoint
In Azure AD, a user can be a member of multiple groups. Groups can include both Active Directory groups (which can be nested) and Office 365 (SharePoint) groups (which cannot be nested).
A SharePoint user can only be a member of SharePoint groups, since SharePoint does not keep track of membership of Active Directory groups. That said, a user may have access to content in SharePoint indirectly due to an Active Directory group having been granted access.
AD User Scope vs SharePoint User Scope
Unless you're working directly with the user profile service, when you work with SharePoint users programmatically, they need to be retrieved from a specific site in SharePoint. This is because each site collection has its own set of groups which cannot be used on other site collections within the SharePoint farm, so group membership is tracked only on a site-by-site basis.
Note that this means that a user's lookup ID number (which is different from their login name) may vary between site collections. This also means that a user's collection of groups will vary depending on the site from which the user object was retrieved.
An Azure AD user has no such silos.

Office 365 and Sharepoint apps

is there a way to create a access web app and use as database an azure sql database. and use it as the main application database or a secondary one.
Either is it possible to create a database that is shared over more than one sharepoint app.
Last but not least is there a way to catch the visitors microsoft mail and use it in a macro to change the views depending on the accesslevel we want him to have on our app.So we can create for example user based profile, either with that way or with creating a user login and registration form.
Thanks in advance.
is there a way to create a access web app and use as database an azure sql database
When you design and modify in Access 2013 or later, the data and database objects are stored in SQL Server or Microsoft Azure SQL Database, so you can share the data within your organization using on-premises SharePoint 2013 or Office 365 for business.
Last but not least is there a way to catch the visitors microsoft mail
You could use the Access Custom Web App Function to get the email address , it could be used in user interface (UI) macros .
UserEmailAddress Function (Access custom web app)

Retrieve Office 365 directory information from SharePoint online

I was wondering if is it possible to retrieve Office 365 directory information (i.e. security group membership) from SharePoint online programmatically (for example through a workflow custom action)?
By the way, I am not looking for retrieving Sharepoint group membership information.
I know the custom development is pretty limited with SharePoint online since the code has to run as a sandbox solution. Is there any web service or any another solution available?
I have been looking for information about this matter but I could not find anything so I guess there is no way to do this.
In our case there is an active directory synchronized with office 365. So we will use a powershell script to read data from AD and update a sharepoint list every day.
Then we will be able to use this data from custom code (like a workflow custom action).

Read data from Office 365 Active Directory

With the release of Office 365 can someone tell me the support available for custom visual sandboxed web parts created using Visual Studio 2010 SharePoint Power Tools that fetches an Office 365 active directory attribute values for a particular user? E.g. If my company already has existing users in a local Active Directory environment when I subscribe to Microsoft Office 365, there are tools for synchronizing those users to Office 365 directory. Let say I have synchronized my local Active Directory to Office 365 Directory, now is it possible to programmatically or OOTB way to read Office 365 directory attribute’s value for any Office 365 Directory user? I have a custom attributes added to my local Active Directory one of the attribute is “CC Number” and I want to get the value associated with this attribute for some XYZ user.
We have an Office 365 SharePoint application to which we would like to add either (or both) a custom sandboxed web part and a OOTB web part that only reads a data from an Office 365 Directory for respective Office 365 directory user.
Is this type of functionality supported with the first/current release of Office 365?
it's a really common scenario that organizations will move parts of their systems into the Microsoft Cloud by using Office365. In order to get rid of the additional AD management overhead you have to build a federation on AD level.
You need a SecureTokenService which does the authentication for your users. Microsofts implementation of STS is ADFS (ActiveDirectory Foundation Services) which could easily be plugged into an existing AD structure. Your AD has to be 2008 I think.
There is a good ebook from Dominick Baier and some other security guys available. It's called "Guide to claim based identity", you can read it online on http://msdn.microsoft.com/en-us/library/ff423674.aspx or there is anywhere a download it think... can't remember sry.

SharePoint user's AD group membership

I've been tasked with creating a SharePoint web part for our new web site. One of the things it needs to know is which AD groups the current user belongs to (each site user will belong to one or more special security groups within the domain.) Is there a part of the SharePoint API that exposes this information, or do I need to query AD directly?
I would just do an LDAP query directly. This is much simpler and the LDAP interface to Active Directory is well documented.
Check out these .NET namespaces.
System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.ActiveDirectory

Resources