Programming Azure AD Graph REST API with Java
0 h 50 m
In this lab, you will use Java to write a back-end console application and register it with Azure Active Directory. You will then create a Key for the Registered app, and write code to generate an Access Token for the application to use when calling the Azure AD Graph API. Code will also be written to call the Azure AD Graph REST API from within Java using the Access Token for authentication.
- Experience with Microsoft Azure
- Experience with Java programming
In this exercise, you will connect to the environment that was setup for the lab.
In this exercise, you will setup a Java application to be used throughout this lab to run code that interacts with the Azure AD Graph APIs.
In this exercise, you will register the application with Azure AD. You will also copy the Application Id (aka Client Id) and Key (aka Client Secret) information for the Azure AD app registration for use later in the lab.
In this exercise, you will write code that will connect to Azure AD and get an Access Token that the application will later use to authenticate with the Azure AD Graph API.
In this exercise, you will write code that calls the OAuth 2 Permission Grants endpoint on the Azure AD Graph API, to receive a JSON response that contains the Permission Scope information for the application.
In this exercise, you will write code that calls the Azure AD Graph API to get a list of all the Users in the Azure AD directory.