Share via

Query AD from SharePoint

Anonymous
2015-11-02T15:53:58+00:00

We use SharePoint in office 365 and I have been asked to make a phone list in SharePoint that will query Active Directory and display everyone's phone numbers.  We have 3 domain controls in the organization and they sync every 3 hours to the Azure AD.  I would prefer to pull the data from the Azure AD that is part of out office 365 subscription and display it in a SharePoint list, but I can't find anyway to enable SharePoint to pull data from the Azure AD.

The guides I have seen show a "Connect to external data source" under the list settings, but I don't see that option when using Office 365's SharePoint.

Can anyone point me in the right direction?

Microsoft 365 and Office
Microsoft 365 and Office

A comprehensive suite of productivity tools and cloud services that enhance collaboration, communication, and efficiency. Combining classic Office apps with advanced Microsoft 365 features, it supports both personal and business needs

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2015-11-03T03:28:30+00:00

Currently,  it is not feasible to directly import the data from Azure AD to SharePoint Online list. Thanks for your understanding.

As a workaround, we can export the users’ phone number from Azure AD as a CSV file, and then import it to SharePoint Online list with Import Spreadsheet app. However, when the phone number changes in Azure AD, you need to update this list manually.

1.Use the Windows PowerShell to export the users’ phone number.

Manage Azure AD using Windows PowerShell.

Export-Csv.

The syntax could be get-msoluser|select-object firstname,lastname,mobilephone|export-csv D:\new2.csv.

2.Edit the CSV file and save it as .xlsx type.

3.In SharePoint Online, add an app called Import Spreadsheet and choose the Excel file you saved at Step 2.

You may also post a new thread in our MSDN forum to check if there are some better ideas  to meet your requirement.

Best regards,

Tim

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2015-11-03T16:41:26+00:00

    Thanks for the info.  I'll look into doing this with the Spreadsheet as this data only needs to be updated a couple times a year.

    Thanks!

    Was this answer helpful?

    0 comments No comments