Home

Awesome

[ARCHIVED] Office 365 Profile Sample for Android Using Microsoft Graph

Build Status

Note: This repo is archived and no longer actively maintained. Security vulnerabilities may exist in the project, or its dependencies. If you plan to reuse or run any code from this repo, be sure to perform appropriate security checks on the code or dependencies first. Do not use this project as the starting point of a production Office Add-in. Always start your production code by using the Office/SharePoint development workload in Visual Studio, or the Yeoman generator for Office Add-ins, and follow security best practices as you develop the add-in.

The first page presents you with a list of users. The second page displays information about any user you choose to view. All of this information, including files shared with the user, the user's alias, hire date, manager, direct reports, and groups comes from Microsoft Graph (previously called Office 365 unified API).

The following image shows the user's page that displays the information mentioned above:

Office 365 Profile sample

Device requirements

To run the Profile sample, your device needs to meet the following requirements:

Prerequisites

To use the Office 365 Profile sample for Android you need the following:

You can also add a native client application in Azure and grant proper permissions to it.

Open the sample using Android Studio

  1. Install Android Studio and add the Android SDK packages according to the instructions on developer.android.com.
  2. Download or clone this sample.
  3. Start Android Studio.
    1. Select Open an existing Android Studio project.
    2. Browse to your local repository and select the O365-Android-Profile project. Click OK.
  4. Open the Constants.java file.
    1. Find the CLIENT_ID constant and set its String value equal to the client id you registered in Azure Active Directory.

    2. Find the REDIRECT_URI constant and set its String value equal to the redirect URI you registered in Azure Active Directory. Office 365 Profile sample

    Note: If you don't have CLIENT_ID and REDIRECT_URI values, add a native client application in Azure and take note of the CLIENT_ID and REDIRECT_URI.

Once you've built the Profile sample, you can run it on an emulator or device.

Questions and comments

We'd love to get your feedback on the O365 Android Profile project. You can send your questions and suggestions to us in the Issues section of this repository.

Questions about Office 365 development in general should be posted to Stack Overflow. Make sure that your questions or comments are tagged with [Office365] and [API].

Additional resources

Copyright

Copyright (c) 2015 Microsoft. All rights reserved.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.