App Registration of .Net Application in Azure AD

In my last post, I was testing the Beta Graph API to get my Teams Presence. The only real challenge I found was understanding the permissions and authentication needed to make it work.

Now that we have validated that we are able to query the presence for the particular user, we proceed to building a tool to further validate the Presence API query and handling the various output.  In preparation for our Windows .Net Forms application, we must Register our application in our Azure Active Directory admin center. Learn more about this here. Also to understand the difference between public and confidential client applications, go here. Both are good reading and will provide good background for App Registration options and impact.

We navigate to

Click on Azure Active Directory

Then, click on App Registrations

Create a “New registration” and complete the fields.

Click on “Register” when done.

Add Permissions

Click on API Permissions to add the permissions to this App registration.

Then click on “Add a permission“. In the next dialog, click on “Microsoft Graph” and then “Delegated permissions“:

Search and add the following permissions:

  • Presence.Read – Read user’s presence information
  • Presence.Read.All – Read presence information of all users in your organization

Click on “Add permissions” to Save the changes.

Configure Authentication and Platform Configurations

Click on Authentication to configure the platform and add the proper Redirect URIs.

Click on Add a Platform and then the “Mobile and Desktop applications”.

Mobile and Desktop applications

Check and add the following Redirect URIs:

Make sure that the Default Client Type is treated as a Public client.

Platform Configuration options screen.

Be sure to “Save” the changes.

Get the Client ID

Now, click on the Overview menu option.

Be sure to copy the Client ID or Application (client) ID for later use in building the Application.

That’s it for the App Registration. Next, we build a quick prototype tool to prove out our concept.

Another great video here on the Microsoft Graph Auth Overview.

One thought on “App Registration of .Net Application in Azure AD

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website at
Get started
%d bloggers like this: