0

We have the roles of each user stored in our O365 active directory. Is there any way to access this information from Sharepoint (In app part/webpart code preferably)? Thanks!

2

There is, but you'll need to use the Microsoft Graph API to do it. I can start you along the answer, as far as how to access the MS Graph API from a SharePoint client side web part, or app part... check out my (3 part) blog post here:

Extending SharePoint with ADAL and the Microsoft Graph API – Part 1 (The Setup)

The code would be similar, but you'd need to find the right endpoints in the MS Graph API to get the information you're looking for. I'm not exactly sure what you're looking for but I can start you here:

Working with users in Microsoft Graph

| improve this answer | |
  • Thanks for the response. Could this API also be used to read information from an Excel spreadsheet? – YungGun Feb 6 '17 at 14:16
  • Also, in your blog post you use Microsoft Azure to set up parts of the app, I do not have a Microsoft Azure subscription. Is it still possible for me to use the Microsoft Graph API? – YungGun Feb 6 '17 at 14:57
  • @YungGun, "O365 active directory" is Azure Active Directory, however, sometimes if you haven't , you need to "connect" your O365 Active Directory to the admin portal for Azure AD. If you go into your tenant admin, and down to "Admin Centers" then select "Azure AD". – Julie Turner Feb 6 '17 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.