none
How can we access my organization users onedrive data using graph API RRS feed

  • Question

  •  

    We want to access and manage all our organization users one drive data,We were able to access only admin data using OAuth2.0 and graph API but not for all users.Is there a way to do this?

     

     

     

    Saturday, November 26, 2016 6:49 AM

Answers

All replies

  • Hi,

    Try the OneDrive API: https://dev.onedrive.com/getting-started.htm. There are lots of examples on GitHub, which you can use as well: https://github.com/onedrive.



    Regards, Sjoukje. Blog | LinkedIn | Twitter


    Monday, November 28, 2016 7:01 AM
    Moderator
  •  Hi,

      Thanks for you reply!!

       I have used the same APIs and I am able to pull authenticated(admin) users data but not his sub-accounts.

       Please find my complete requirement as follows.

       When an admin authenticated using OAuth2.0 flow as mentioned in the document I want to pull all his    sub-accounts data along with admin's data.

       Please let me know do we have any way to achieve this?.

       Let me know if you need more information.



     


    • Edited by Team Aj Monday, November 28, 2016 10:09 AM
    Monday, November 28, 2016 10:09 AM
  • Hi,

    What do you mean by sub-accounts? Does the Administrator have multiple accounts in different tenants?


    Regards, Sjoukje. Blog | LinkedIn | Twitter

    Tuesday, November 29, 2016 3:45 PM
    Moderator
  • Hi,

    Yes.

    I have an office 365 business account,Once after login i can create multiple accounts under my business account.

    My requirement is once Administrator gets authenticated,i want  to access all accounts data under that account including admin.

    I have tried onedrive and Microsoft graph API using OAuth 2.0 authentication and I am able to retrieve the Administrator data but not other accounts.

    Regards

    Ajay

    Tuesday, November 29, 2016 6:54 PM
  • Hi,

    have you tried using the Azure Active Directory (AD) Graph API for this:

    https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations

    • /users targets the user resource collection. You can use this resource path to read all users or a filtered list of users in your tenant or to create one or more new users in your tenant.

    Once you've retrieved the list of users, you can create a call to the OneDrive API to retrieve the data for each userid.


    Regards, Sjoukje. Blog | LinkedIn | Twitter



    Monday, December 5, 2016 1:37 PM
    Moderator
  • Thanks and i am able to do that.

    Also i have one more question,

    How can i authenticate any other organisation user using OAuth2.0 flow?

     

    Regards

    Ajay

    Tuesday, December 6, 2016 7:53 AM
  • Hi,

    You need to change the tenant id in the below Url: 

    https://graph.windows.net/{tenant_id}/{resource_path}?{api_version}[odata_query_parameters]



    Regards, Sjoukje. Blog | LinkedIn | Twitter

    Monday, December 19, 2016 11:50 AM
    Moderator