<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Azure Active Directory Developer Support Team</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/aaddevsup/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/aaddevsup/feed.xml</link>
    <description>How AuthN do we talk? Thoughts and musings by the Microsoft AAD Developer Support team</description>
    <lastBuildDate>Wed, 02 Jan 2019 20:09:36 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>We have a new home</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/we-have-a-new-home</link>
      <pubDate>Wed, 02 Jan 2019 15:47:42 GMT</pubDate>
      <dc:creator><![CDATA[bac hoang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=4355</guid>
      <description><![CDATA[Hi everyone,

We are migrating the content of the blog site over to http://blogs.aaddevsup.xyz/....]]></description>
      <content:encoded><![CDATA[Hi everyone,

We are migrating the content of the blog site over to <a href="http://blogs.aaddevsup.xyz/">http://blogs.aaddevsup.xyz/</a>.  Please book mark this new link.]]></content:encoded>
    </item>
    <item>
      <title>Receiving Error AADSTS50058 in JavaScript Setting</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/receiving-error-aadsts50058-in-javascript-setting</link>
      <pubDate>Wed, 07 Nov 2018 20:47:30 GMT</pubDate>
      <dc:creator><![CDATA[Frank Hu MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=1765</guid>
      <description><![CDATA[Introduction
This post is to review why a user may receive the error AADSTS50058 in a Javascript...]]></description>
      <content:encoded><![CDATA[<h1>Introduction</h1>
This post is to review why a user may receive the error AADSTS50058 in a Javascript setting.

The full error that is shown is :

<em>AADSTS50058: A silent sign-in request was sent but no user is signed in. The cookies used to represent the user's session were not sent in the request to Azure AD. This can happen if the user is using Internet Explorer or Edge, and the web app sending the silent sign-in request is in different IE security zone than the Azure AD endpoint (login.microsoftonline.com).</em>

We will review why this issue may occur and some possible resolutions to prevent this error from occurring again.
<h2>Reason for AADSTS50058</h2>
The reason that the error occurs is because a silent sign in is sent to the login.microsoftonline.com endpoint, however the AADSSO cookie isn't being detected. This cookie determines if the user is logged in or not. The silent sign in is only meant to be used if the user is already known to be logged in or has a refresh token to exchange for a new access token.

By checking the KMSI box the first time logging in, this will add the KMSI cookie to let you refresh your access token so that users won't receive this error for a longer period of time.
<h2>Possible Resolution #1 Proactively Check for Expiration</h2>
You can attempt to prevent this error from ever occurring by checking if you have a valid id token. If you're ID token is not valid, you will ask the user to login again. You can check if the ID Token is valid by getting the token using AuthenticationContext.getCachedToken(clientID) and then checking the Expiration in the JWT Token.
<h2>Possible Resolution #2 Catching the Error and Asking the User to Login Again</h2>
To resolve this error you will need to catch this error in a callback that you can pass into the acquiretoken ADAL JS function. If the AADSTS50058 error occurs, you'll ask the user to login again.
<h2>Possible Resolution #3 Browser Extension Cookie Blockers and Third Party Cookies Disabled</h2>
Some users may experience this issue due to a browser extension that is blocking cookies for tracking purposes. This will cause this AADSTS50058 error to occur, you will need to whitelist the login.microsoftonline.com endpoint in your browser extension in order to avoid receiving this error again.

This error can also occur if the third party cookies have been disabled in your browser. Re-enable third party cookies in your browser to prevent this error from occurring.
<h1>Conclusion</h1>
In this post we reviewed three possible resolutions to fix this error. If you are still experiencing this error after attempting all three resolutions please file a support ticket with Azure Support and file an issue on the ADAL github library that you are using. The github issue section for the ADAL JS library can be found here : <a href="https://github.com/AzureAD/azure-activedirectory-library-for-js/issues">https://github.com/AzureAD/azure-activedirectory-library-for-js/issues</a>]]></content:encoded>
    </item>
    <item>
      <title>How to Use the .Net Microsoft Graph SDK to Get Users and Get Next Page of Results</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/how-to-use-the-net-microsoft-graph-sdk-to-get-users-and-get-next-page-of-results</link>
      <pubDate>Wed, 07 Nov 2018 20:47:04 GMT</pubDate>
      <dc:creator><![CDATA[Frank Hu MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=4235</guid>
      <description><![CDATA[Introduction
This post will explain how to use the .Net Microsoft Graph SDK in order to get users....]]></description>
      <content:encoded><![CDATA[<h1>Introduction</h1>
This post will explain how to use the .Net Microsoft Graph SDK in order to get users. This article is assuming that you have already gotten an Access Token using ADAL .NET. In order to learn more on how to get the Adal .NET token, please reference :
<h3 class="entry-title"><a href="https://blogs.msdn.microsoft.com/aaddevsup/2018/11/07/how-to-use-the-adal-net-library-to-call-the-microsoft-graph-api-in-a-console-application-using-authorization-code-flow/">How to Use the ADAL .NET library to Acquire a Token Interactively in a Console Application (Authorization Code Flow) Link</a></h3>
<h2>Warning Regarding Microsoft Graph SDK</h2>
The Microsoft Graph SDK isn't updated as frequently as the Microsoft Graph API, which makes the Microsoft Graph SDK lag behind a bit. The most effective way to keep up with the Microsoft Graph API is to utilize the HTTPClient, and then parse the response body accordingly. If you would like to utilize the data structures and requests predefined in the Microsoft Graph SDK that is fine, however know that the SDK will not always be up to date with the Microsoft Graph API.

&nbsp;
<h2>Installing the MSFT Graph SDK NuGet</h2>
In order to install this SDK, please go to your project management and then go to browse. Then look up <strong>Microsoft.Graph</strong>. This NuGet Package is shown in the picture below.

It is the <strong>Microsoft.Graph</strong> library.

<img src="https://msdnshared.blob.core.windows.net/media/2018/11/Microsoft.Graph_.png" alt="" width="949" height="255" class="alignnone wp-image-4245" />

&nbsp;
<h2>Making Calls Using the Microsoft Graph SDK</h2>
In order to make calls to the Microsoft Graph SDK, you will need to get the Access token as shown in the other post on utilizing ADAL .net library to acquire a token. Once the access token has been acquired, you will create the graphserviceclient, setting the header of the request message as the access token. This is shown in the github gist below.

<script src="https://gist.github.com/frankhu1234/436f98f3201d30bb8ba3ef43ce584a37.js"></script>

In the example, we get use the object in the graphserviceclient Users, which has a request call, which has the HTTP request call within, which can be called by awaiting the .getAsync(); method chain.

In order to set the OData parameters, you can add them after the request() call.

<span>Expand, Skip, Top, OrderBy, and Filter are also supported via the client library when supported by the Microsoft Graph service for the request type.</span>

For more information, please refer to the documentation for the MSFT Graph SDK here:<a href="https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/docs/overview.md"> https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/docs/overview.md</a>

In order to <strong>page</strong> through the results, you will have to utilize the call : await users.NextPageRequest.GetAsync();

Where users is the GraphServiceClient Result.
<h1 title="0 user(s) rated">Conclusion</h1>
<div title="0 user(s) rated">This post has gone over how to install and utilize the Microsoft Graph SDK in order to get users from the Microsoft Graph API. We also review how to page through the Microsoft Graph SDK users in order to get the next set of users accordingly. If you have any issues with the Microsoft Graph SDK, please file an issue with them and the maintainers of the SDK will work to resolve the issue. <a href="https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues">https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues</a></div>
<div title="0 user(s) rated">If you have any issues with Azure Active Directory and making the Microsoft Graph API call, please file a support ticket with Azure and we will get back to you as soon as possible to resolve the issue.</div>]]></content:encoded>
    </item>
    <item>
      <title>How to Use the ADAL .NET library to Call the Microsoft Graph API in a Console Application (Using Authorization Code Flow)</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/how-to-use-the-adal-net-library-to-call-the-microsoft-graph-api-in-a-console-application-using-authorization-code-flow</link>
      <pubDate>Wed, 07 Nov 2018 20:46:29 GMT</pubDate>
      <dc:creator><![CDATA[Frank Hu MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=3365</guid>
      <description><![CDATA[Introduction
This post is to show how to use the ADAL .NET library to acquire a token interactively...]]></description>
      <content:encoded><![CDATA[<h1>Introduction</h1>
This post is to show how to use the ADAL .NET library to acquire a token interactively in a console application. It will go through setting up an Azure Active Directory Application, setting up the .net console application, acquiring an access token, and then make a HTTP request using the token acquired from the ADAL .net library to get 5 users using the Microsoft Graph API.

&nbsp;
<h2>Setting up your Azure Active Directory Application Registration</h2>
First we will need to setup an Azure Active Directory Application Registration in your Azure Portal. You can do this by going to the Azure Portal &gt; Azure Active Directory &gt; App Registrations &gt; Add Application.

<img src="https://msdnshared.blob.core.windows.net/media/2018/11/Create-App-Registration.png" alt="" width="758" height="474" class="alignnone wp-image-4175" />

&nbsp;

&nbsp;

&nbsp;

Then set the Application Registration to a native app, and put in your own respective values for redirect url and name. The redirect URL will not matter, it will only be important to remember for when you are asking for an access token, and the name is up to you.
<blockquote>Note: It is important to make it a Native Application, otherwise you will get errors saying that there is no Client Secret</blockquote>
<img src="https://msdnshared.blob.core.windows.net/media/2018/11/Create-App.png" alt="" width="384" height="1165" class="alignnone wp-image-4185" />

&nbsp;

After you have created the Application, keep track of the Application ID for later. You will need it to authenticate with this AAD Application Registration, then go to required permissions &gt;Add &gt; select an API &gt; Microsoft Graph API &gt; select view users' basic profile &gt; and press grant permissions.

For more information on which permissions you need and how to grant permissions in different ways, please refer to these posts :

https://blogs.msdn.microsoft.com/aaddevsup/2018/05/21/finding-the-correct-permissions-for-a-microsoft-or-azure-active-directory-graph-call/

https://blogs.msdn.microsoft.com/aaddevsup/2018/05/08/receiving-aadsts90094-the-grant-requires-admin-permission/

&nbsp;

<img src="https://msdnshared.blob.core.windows.net/media/2018/11/Setting-Permissions.png" alt="" width="3147" height="918" class="alignnone size-full wp-image-4205" /> <img src="https://msdnshared.blob.core.windows.net/media/2018/11/Adding-Permissions-and-Granting-permissions.png" alt="" width="2951" height="1829" class="alignnone size-full wp-image-4215" />
<h2>Setting up the console application</h2>
To start, let's create a new project, install the correct NuGet packages, and fix reference assembly issues.

In this tutorial I will be using a new project with the template Console App (.net framework).

<img src="https://msdnshared.blob.core.windows.net/media/2018/11/Create-Project.png" alt="" width="784" height="184" class="alignnone wp-image-4115" />

<img src="https://msdnshared.blob.core.windows.net/media/2018/11/Console-App.net-project.png" alt="" width="747" height="520" class="alignnone wp-image-4105" />

<img src="https://msdnshared.blob.core.windows.net/media/2018/11/FreshStart.png" alt="" width="944" height="271" class="alignnone wp-image-4125" />

&nbsp;

&nbsp;

&nbsp;

Now that we have a fresh new console .net application, we will need to install some libraries in order to get an access token from Azure Active Directory. The ADAL libraries are Microsoft maintained libraries that we will need to get for our .net console application.

We can do this by going to our NuGet Manager and picking up the correct libraries.

In order to do this you will want to right click on the solution, and go to <strong>Manage NuGet Packages for Solution</strong>.

In this example we will be using the NuGet pacakages below. You can search and then download them via the <strong>B</strong><strong>rowse</strong> section of the NuGet Manager.

Id Versions
-- --------
Microsoft.IdentityModel.Clients.ActiveDirectory {4.3.0}
Microsoft.IdentityModel.JsonWebTokens {5.3.0}
Microsoft.IdentityModel.Logging {5.3.0}
Microsoft.IdentityModel.Tokens {5.3.0}
Newtonsoft.Json {11.0.2}
System.IdentityModel.Tokens.Jwt {5.3.0}

&nbsp;

<img src="https://msdnshared.blob.core.windows.net/media/2018/11/Manage-Nuget.png" alt="" width="781" height="484" class="alignnone wp-image-4145" /><img src="https://msdnshared.blob.core.windows.net/media/2018/11/Installing-NuGet-Packages.png" alt="" width="820" height="317" class="alignnone wp-image-4135" />

&nbsp;

&nbsp;

&nbsp;

The ADAL libraries are the Microsoft.IdentityModel libraries, however the other two libraries are being used for formatting JWT tokens and JSON tokens to be a readable print. This is to make our lives easier later on once we get the access token and JSON response.

After you have installed all the NuGet libraries, you may still need to fix a reference assembly for <strong>System.Web.Script.Serialization</strong>.

In order to do this, right click on the references in the solution explorer and then click add reference. We will then want to add the System.Web.Extensions, as shown in the picture below.

<img src="https://msdnshared.blob.core.windows.net/media/2018/11/Adding-References.png" alt="" width="954" height="418" class="alignnone size-full wp-image-4165" /><img src="https://msdnshared.blob.core.windows.net/media/2018/11/SystemWebExtensions.png" alt="" width="1570" height="738" class="alignnone size-full wp-image-4155" />

&nbsp;
<h2>Variable Initialization</h2>
Now that we have all the correct libraries and references installed into our solution, you will want to declare some variables for your AAD token acquisition.

You'll need to declare the variables listed below. In this example we will be accessing the Microsoft Graph API, so the resource URI has already been declared.

You will need to replace the client id(Application ID), redirect URI, and tenant id with your own respective information. You can get the tenant ID from your Azure Active Directory portal in the overview section. You will need to get the client id and redirect URI from the first steps that we followed when creating the AAD Application.

<script src="https://gist.github.com/frankhu1234/ba87de35d6a9393f550bc3f578955629.js"></script>

After you have initialized the variables we can setup our main method with some empty methods. I have setup my main method as below. First we will get our access token, and then make the call to the Microsoft Graph with the access token to retrieve 5 users.

<script src="https://gist.github.com/frankhu1234/5d1104dcb828af856291c50ddaebcf2a.js"></script>

Once we have the variables declared and our main skeleton method setup, we can start on our Access Token Call method, shown below. First we initialize the authcontext which is the variable that maintains the environment for the ADAL library. In this setup we try to acquire the access token three times if it fails. Once you have initialized the authcontext, you can simply make the call :

authContext.AcquireTokenAsync(resourceUri, clientId, new Uri(redirectUri), new PlatformParameters(PromptBehavior.Auto));

Which will get the access token. In this method we also pretty print the JWT token, so that you can read the claims in the console.

<script src="https://gist.github.com/frankhu1234/e021d69404c397348f2070f2a091f41f.js"></script>

The pretty print method can be found here :
<script src="https://gist.github.com/frankhu1234/f3fbd8af568189406f50879077be2a0b.js"></script>

That defines the getAccessToken() method.

&nbsp;

Now, we will need to flesh out the getMembers() method.
This method can be seen below, first we add the access token we just got to the headers of the HTTP client, then we make the Microsoft graph call using a getAsync method call from the HTTP client class. The documentation on the Microsoft Graph list users call can be read here :

<a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list">https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list</a>

In addition to getting the users, we have set the OData V4 $top requirement, in order to get only the first 5 users. In order to continue getting the next 5 users, you can utilize the skip token that is sent back in the response body.
More documentation on this can be found here :
<a href="https://developer.microsoft.com/en-us/graph/docs/overview/query_parameters">https://developer.microsoft.com/en-us/graph/docs/overview/query_parameters</a>
<a href="https://developer.microsoft.com/en-us/graph/docs/concepts/paging">https://developer.microsoft.com/en-us/graph/docs/concepts/paging</a>

&nbsp;

After getting the JSON response, we utilize the prettify JSON method in order to clean up and easily print out the JSON response.

&nbsp;

<script src="https://gist.github.com/frankhu1234/d5ba5b4882b80b5e218bd5a5a7b237bb.js"></script>
<script src="https://gist.github.com/frankhu1234/b6750185b19fd4ada4ba36b099985813.js"></script>

Now we can run our console application, and we will get 5 users from the Microsoft Graph API.
<blockquote>Note: The account you login with will need the permissions to read all basic user profiles in order to properly call the Microsoft Graph API call as this is an on behalf of the user flow.</blockquote>
<h1>Conclusion</h1>
After going through all of this we have setup an AAD App registration that we can connect to using ADAL .NET. We have filled out the code to acquire an access token using ADAL and then make a HTTP request using the HTTP Client to get 5 users from the Microsoft Graph API.

If you have any issues with the code, feel free to open up a GitHub issue on the repository to address any coding issues. If you are having an issues with AAD Access, please open up a support ticket and one of our support engineers will reach out as soon as possible.

The full GitHub Repository of this code can be found here : <a href="https://github.com/frankhu1234/ADAL-.NET-Console-Application">https://github.com/frankhu1234/ADAL-.NET-Console-Application</a>]]></content:encoded>
    </item>
    <item>
      <title>Unable to Delete Azure Active Directory Application Registration</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/unable-to-delete-azure-active-directory-application-registration</link>
      <pubDate>Wed, 31 Oct 2018 19:56:30 GMT</pubDate>
      <dc:creator><![CDATA[Frank Hu MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=3975</guid>
      <description><![CDATA[Introduction
This post is meant to go over the issue when the Azure Active Directory Application...]]></description>
      <content:encoded><![CDATA[<h1>Introduction</h1>
This post is meant to go over the issue when the Azure Active Directory Application Registration delete button is grayed out. This issue could occur for a few reasons, and this document will go over the current known issues with Azure Active Directory Portal issues. This post will mainly go over the issues detailed in the v1.0 endpoint (portal.azure.com).

&nbsp;

&nbsp;

&nbsp;
<h3>Context</h3>
Some users will find that they have many Azure Active Directory Application Registrations and will want to clean up the list of Registrations, which makes the user want to delete a few. They will run into not being able to delete the Application as the button is grayed out like in the picture below.

&nbsp;

<img width="789" height="115" class="alignnone wp-image-3985" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/Delete-Button.png" />

&nbsp;
<h1>Resolution</h1>
The reason that you are unable to delete the AAD Application Registration is because of some properties in the AAD Application Registration or your account doesn't have the right permissions. I will first go over the properties for the possible issues with the AAD Application Registration.
<h3></h3>
&nbsp;

&nbsp;
<h3>AAD Application Registration Property Issues for Web App/APIs</h3>
If the AAD Application Registration has the multi-tenanted value checked, then the Application will not be able to be deleted. In order to resolve this issue please follow the highlighted steps in the picture below. Go to your AAD Application Registration, then go to Settings &gt; Properties &gt; Multi-Tenanted - Set to No. Then after saving and backing out of the Application Registration, go back into the registration and you will be able to delete the AAD Application Registration.

<img width="868" height="646" class="alignnone wp-image-3995" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/Multi-Tenant-Button.png" />

&nbsp;

&nbsp;

&nbsp;

&nbsp;
<h3>AAD Application Registration Property Issues for Native Applications</h3>
For users who have AAD Application Registrations that are registered as "Native" Applications, you will have to go into the manifest in order to remove the multi-tenanted setting. This can be found by following the steps in the picture below. Go to your AAD Application Registration, click on Manifest, and then set the availabletoothertenants value to false. Save the manifest and then go back in to the Azure Active Directory Application Registration, and you will be able to delete the Application Registration.

<img width="863" height="581" class="alignnone wp-image-4005" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/Available-to-other-tenants.png" />

&nbsp;

&nbsp;

&nbsp;
<h3>User Role Issues</h3>
Some Users will be unable to delete an Azure Active Directory Application Registration because they do not have the correct roles to delete the Application Registration. The roles can be found here : <a href="https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles">https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles</a>

That being said, the roles that have the action : <em>microsoft.aad.directory/applications/delete </em>listed in the "Actions" section are the roles that have the privilege to delete AAD Application Registrations in their respective tenant.

Currently as of 10-25-2018, the only two roles that have this are the <strong>Application Administrator</strong> and <strong>Cloud Application Administrator</strong>.

Note: You can also set a Service Principal to have an admin role following the guide here : <a href="https://blogs.msdn.microsoft.com/aaddevsup/2018/08/29/how-to-add-an-azure-ad-role-to-a-enterprise-application-service-principal/">https://blogs.msdn.microsoft.com/aaddevsup/2018/08/29/how-to-add-an-azure-ad-role-to-a-enterprise-application-service-principal/</a> if you are interested in deleting AAD Applications using a service principal.

&nbsp;

&nbsp;

&nbsp;
<h3>Deleting Azure AD Application Using Powershell</h3>
You can also utilize Powershell in order to delete an AAD Application Registration. You will need to get the ObjectID from the AAD portal, or use powershell cmdlets to get the AAD Application ID. This link describes how to install the AAD V2.0 powershell in more detail : <a href="https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0">https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0</a>

First you will need to open up powershell in administrator mode.

<img width="677" height="251" class="alignnone wp-image-4075" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/Powershell-Admin.png" />

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

Then you will need to install the AzureAD Module, as shown below.

If nothing shows up, you may have to press enter again to see the get provider prompt. Enter the letter Y or A on each prompt. Each prompt may require you to press enter again.

<img width="744" height="139" class="alignnone wp-image-4035" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/Powershell.png" />

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

After agreeing to install the item, you will need to connect to Azure using connect-azureAD. Be sure to login to the correct tenant (best to use organization account) that has the application you are trying to delete. more about Connect-AzureAD can be found here : <a href="https://docs.microsoft.com/en-us/powershell/module/azuread/connect-azuread?view=azureadps-2.0">https://docs.microsoft.com/en-us/powershell/module/azuread/connect-azuread?view=azureadps-2.0</a>

<img width="758" height="202" class="alignnone wp-image-4045" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/powershell2.png" />

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

Now go to the portal and get the object ID of the Azure AD Application Registration you are trying to delete, this can be shown in the picture below. I've highlighted the objectID and the multi-tenanted property to show this will work for apps that cannot be deleted in the portal. You can also use the cmdlet : get-azureadapplication, more on this is listed here :<a href="https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadapplication?view=azureadps-2.0">https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadapplication?view=azureadps-2.0</a>

<img width="660" height="503" class="alignnone wp-image-4065" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/PortalAppID.png" />

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

Then You will be able to delete the AzureAD application using the Remove-AzureADApplication powershell cmdlet. More on the Remove-AzureADApplication cmdlet can be found here : <a href="https://docs.microsoft.com/en-us/powershell/module/azuread/remove-azureadapplication?view=azureadps-2.0">https://docs.microsoft.com/en-us/powershell/module/azuread/remove-azureadapplication?view=azureadps-2.0</a>

<img width="1306" height="83" class="alignnone size-full wp-image-4055" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/10/RemoveAADApp.png" />

&nbsp;

For more information on the AAD V2.0 powershell cmdlets, please refer to the reference : <a href="https://docs.microsoft.com/en-us/powershell/module/azuread/?view=azureadps-2.0">https://docs.microsoft.com/en-us/powershell/module/azuread/?view=azureadps-2.0</a>

&nbsp;

&nbsp;

&nbsp;

&nbsp;
<h1>Conclusion</h1>
In this post we have gone over a few reasons why you may not be able to delete some or any Azure Active Directory Application Registrations.  We went over the different property settings and the user roles that have the rights to delete an Application Registration. If you have anymore issues, feel free to open a support ticket or comment below and one of our support engineers will reach out to you as soon as possible to resolve the issue.]]></content:encoded>
    </item>
    <item>
      <title>Unable to Modify User Email, Phone Number, Password or Other Personal Information for Azure Active Directory Users</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/unable-to-modify-user-email-phone-number-password-or-other-personal-information-for-azure-active-directory-users</link>
      <pubDate>Wed, 17 Oct 2018 21:51:26 GMT</pubDate>
      <dc:creator><![CDATA[Frank Hu MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=3945</guid>
      <description><![CDATA[Introduction
This post is in regards to the issues in regards to users having issues modifying...]]></description>
      <content:encoded><![CDATA[<h1>Introduction</h1>
This post is in regards to the issues in regards to users having issues modifying Azure Active Directory User attributes such as mail, phone number, resetting passwords, or other personal attributes in user accounts. This will review the reason behind these changes and how to resolve the issue. For many users this was something that was working before and only recently stopped working properly.

&nbsp;
<h2>Reason Behind Change</h2>
There was a recent change to three different attributes that made changing the attributes require the same elevated privileges that password reset requires.<span> The only properties that are being affected are the attributes : mobilePhone, businessPhones/telephoneNumber, and otherMails attributes. <span style="float: none;background-color: #ffffff;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">U</span>ser profile changes can be made with User.ReadWrite.All except for the 3 aforementioned properties. </span>

&nbsp;
<h1>Fix/Resolution</h1>
In order to resolve this issue you will need to set the Service Principal or User that is trying to make the change to a Helpdesk Admins, User Account Admins and Company Admins depending on the user you are trying to modifies role is. Only these three admins can make changes to these three attributes in Azure Active Directory now.
<blockquote>Please note the level of power you are giving the service principal by setting the service principal or user to one of the aforementioned roles, realize that you are giving the user/service principal the ability to perform tasks at that level. This should be done with caution.</blockquote>
&nbsp;
<h2>Microsoft Graph Scenario</h2>
Most users experiencing this issue are Microsoft Graph or Azure Active Directory users that are utilizing the Grant Type Client Credentials in order to make modifications to the three mentioned User Attributes. <strong>Having the Directory.readwrite.all permission is now not sufficient to make modifications to these user attributes anymore.</strong> You will get a 403 error saying insufficient permissions. In order to resolve this issue you can set the Service Principal/Enterprise Application as one of the admin roles in the resolution stated in the last paragraph.

For help on giving a Service Principal an Admin Role please go through this post : <a href="https://blogs.msdn.microsoft.com/aaddevsup/2018/08/29/how-to-add-an-azure-ad-role-to-a-enterprise-application-service-principal/">https://blogs.msdn.microsoft.com/aaddevsup/2018/08/29/how-to-add-an-azure-ad-role-to-a-enterprise-application-service-principal/</a>

&nbsp;
<h1>Conclusion</h1>
Here we have gone over the User Attribute change's reasoning, how to resolve the issue, the Microsoft/AAD Graph Scenario, and a link explaining how to give a Service Principal/Enterprise Application an Admin role. If you have anymore questions in regards to this issue, feel free to comment below on this issue and I will try to get back to you as soon as possible. If you have any dire issues feel free to open a support ticket for Azure Active Directory Developer, and one of our support engineers will reach out to you to resolve the issue as soon as possible.]]></content:encoded>
    </item>
    <item>
      <title>How to filter Fiddler capture traffic using host name and process name</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/how-to-filter-fiddler-capture-traffic-using-host-name-and-process-name</link>
      <pubDate>Wed, 26 Sep 2018 19:46:49 GMT</pubDate>
      <dc:creator><![CDATA[bac hoang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=3935</guid>
      <description><![CDATA[This post discusses a couple of ways to filter Fiddler traffic based on domain names (or host names)...]]></description>
      <content:encoded><![CDATA[This post discusses a couple of ways to filter Fiddler traffic based on domain names (or host names) and client process(es):

<span style="color: #ff0000">Note that before using filter you should make sure Fiddler is configured to capture all processes.  This is indicated at the bottom left corner of Fiddler window.  That area is clickable to change the selection.</span>

<a href="https://msdnshared.blob.core.windows.net/media/2018/09/image85.png"><img width="365" height="189" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/09/image_thumb74.png" border="0" /></a>
<h3>Filter traffic using Fiddler’s built-in filter feature:</h3>
From Fiddler’s right pane –&gt; Filters tab –&gt; select “Use filters” –&gt; under the Hosts section choose “Show only the following Hosts” –&gt; Enter the host names you want to filter on, separated by semicolon

<span style="color: #ff0000">Note:  as you edit this list the text box will change to have the yellow background to indicate the list is unsaved.  Once done, you can just click on the “Actions” button to save the list and the background color should change to white.</span>

<a href="https://msdnshared.blob.core.windows.net/media/2018/09/image86.png"><img width="635" height="374" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/09/image_thumb75.png" border="0" /></a>

<span style="color: #0000ff">Under the “Client Process” section, you can also select a particular process to filter on.  This option is great for a standalone application.  It may not be so useful for capturing browser traffic since there are multiple processes with the same name and it’s hard to tell which process is the right one to filter on.</span>
<h3>Filter traffic using jscript code in the OnBeforeRequest function:</h3>
This option can be used especially for browser scenarios.

From Fiddler’s menu –&gt; Rules –&gt; “Customize Rules…”  -&gt; find the “OnBeforeRequest” function and insert the <em>below </em>jscript code at the beginning of the function –&gt; Make sure to save the changes once done editting.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2018/09/image87.png"><img width="548" height="453" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/09/image_thumb76.png" border="0" /></a>

&nbsp;
<div class="wlWriterEditableSmartContent" id="scid:C89E2BDB-ADD3-4f7a-9810-1B7EACF446C1:1ba0e867-2598-4e8d-ad65-e8f2663f68bc" style="margin: 0px;padding: 0px;float: none">

[sourcecode language="javascript" padlinenumbers="true"]
		// begin filter

		// set this to false to disable filter and true to enable filter
		var filterOn: boolean = true;
		if (filterOn)
		{
			// hide all request by default
			oSession[&quot;ui-hide&quot;] = &quot;true&quot;;
		
			// here are some common processes:  IE - iexplore.exe; chrome - chrome.exe, MS Edge = MicrosoftEdgeCP.exe, IIS Express - iisexpress.exe, Powershell - powershell.exe
		
			// list of domain names to filter on
			var host = [&quot;localhost&quot;,&quot;login.microsoftonline.com&quot;,&quot;graph.microsoft.com&quot;];
		
			// list of processes to filter on
			var processlist = [&quot;chrome&quot;,&quot;microsoftedgecp&quot;,&quot;iisexpress&quot;,&quot;powershell&quot;];
		
			for (var j = 0;j &lt; processlist.length;j++)
			{
				if (oSession.LocalProcess.Contains(processlist[j])){
					for (var i = 0;i &lt; host.length; i++)
					{
						if(oSession.HostnameIs(host[i]))
						{
							oSession[&quot;ui-hide&quot;] = null;
						}
					}
				}
			}
		}
		
		// end filter
[/sourcecode]

</div>
&nbsp;
<h4><u>variables:</u></h4>
<strong>filterOn:</strong>  true to enabe filter and false to disable filter

<strong>host:</strong>  contains the list of domains to filter on

<strong>processlist:</strong> contains the list of process names to filter on
<h3>References:</h3>
<a target="_blank" href="http://docs.telerik.com/fiddler/KnowledgeBase/FiddlerScript/ModifyRequestOrResponse" rel="noopener">Modifying a Request or Response</a>

<a target="_blank" href="http://fiddlerbook.com/Fiddler/dev/ScriptSamples.asp" rel="noopener">FiddlerScript CookBook</a>

<a target="_blank" href="https://www.telerik.com/blogs/understanding-fiddlerscript" rel="noopener">Understanding FiddlerScript</a>]]></content:encoded>
    </item>
    <item>
      <title>Capture http(s) traffic with Http Fiddler</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/capture-https-traffic-with-http-fiddler</link>
      <pubDate>Wed, 12 Sep 2018 05:32:49 GMT</pubDate>
      <dc:creator><![CDATA[bac hoang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=3855</guid>
      <description><![CDATA[1 - Download the Fiddler 4 application and install it on the machine used to reproduce the problem...]]></description>
      <content:encoded><![CDATA[1 - Download the Fiddler 4 application and install it on the machine used to reproduce the problem (if you have not already).  Go to <a href="http://www.telerik.com/download/fiddler">http://www.telerik.com/download/fiddler</a>

2 - Enable the option to  decrypt HTTPS traffic: Tools -&gt; Options -&gt; Https -&gt; select ‘decrypt HTTPS Traffic’ (you may be prompted to install the Fiddler certificate - make sure to select Yes)

<a href="https://msdnshared.blob.core.windows.net/media/2018/09/clip_image0011.png"><img width="691" height="344" title="clip_image001" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/2018/09/clip_image001_thumb1.png" border="0" /></a>

Ensure this option is checked when collecting the trace as the data will have to be recollected if it is not.

3 - Restart the Fiddler program

(For browser-based apps)

4a. Either use private browsing mode or clear the client browser cache on the machine you will be testing from (many files are downloaded once by the browser and then cached and so will be missing from the trace unless the cache is clear; we need to see javascript and stylesheet files etc. to look for rewrite errors).

(For non browser-based apps)

4b. Launch your client application

5 – Reproduce the problem and you should see https traffic showing up in the Fiddler window.

6 - Save the resulting session output as SAZ files (File -&gt; Save -&gt; All Sessions)]]></content:encoded>
    </item>
    <item>
      <title>How to Add an Azure AD Role to a Enterprise Application (Service Principal)</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/how-to-add-an-azure-ad-role-to-a-enterprise-application-service-principal</link>
      <pubDate>Wed, 29 Aug 2018 21:23:43 GMT</pubDate>
      <dc:creator><![CDATA[Frank Hu MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=3815</guid>
      <description><![CDATA[Introduction
This post is to help users be able to assign administrative roles to Enterprise...]]></description>
      <content:encoded><![CDATA[<h1>Introduction</h1>
This post is to help users be able to assign administrative roles to Enterprise Applications/Service Principals so that they can perform duties that would otherwise require a user with elevated permissions to accomplish. This is convenient when a user wishes to use a service principal in order to reset a password, or to perform some activity that requires admin privileges programmatically without an interactive sign in (using client credentials grant type flow).

In this post we will go over installing MSOnline (MSOL) PowerShell module, finding the Object ID for your Enterprise Application, and then giving the Enterprise Application an administrative role.

&nbsp;
<blockquote>Note: We will be using MSOnline powershell cmdlets, these are a bit outdated. So as of 8-29-2018 they have not been deprecated yet, however please be sure to check the status of MSOL library. The history for the AAD libraries can be found here: <a href="https://social.technet.microsoft.com/wiki/contents/articles/28552.microsoft-azure-active-directory-powershell-module-version-release-history.aspx" title="https://social.technet.microsoft.com/wiki/contents/articles/28552.microsoft-azure-active-directory-powershell-module-version-release-history.aspx">https://social.technet.microsoft.com/wiki/contents/articles/28552.microsoft-azure-active-directory-powershell-module-version-release-history.aspx</a>

We will be using Version 1.1.166.0 (PowerShell V1 General Availability)

You can also utilize AAD powershell V2.0. We will be going over this as well.</blockquote>
&nbsp;

&nbsp;
<h1>Prerequisite</h1>
In order to add an Application role to a Service Principal, you will need to have the proper permissions to assign roles to objects. Per the documentation here : <a href="https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles#details-about-the-global-administrator-role" title="https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles#details-about-the-global-administrator-role">https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles#details-about-the-global-administrator-role</a>

&nbsp;

You will need to be a Global Administrator in order to set the roles to the Enterprise Application. Please be sure to get the global admin to perform to set the Enterprise Application to have the administrative privilege.

&nbsp;
<h1>Getting Started with MSOL</h1>
In order to add the application role to a service principal we will have to utilize the older MSOL powershell Cmdlets.

In order to install MSOL, open up PowerShell and type in :

&nbsp;

<em>Install-Module -Name MSOnline</em>

&nbsp;

You can find the library in the PowerShell gallery here : <a href="https://www.powershellgallery.com/packages/MSOnline/1.1.183.17" title="https://www.powershellgallery.com/packages/MSOnline/1.1.183.17">https://www.powershellgallery.com/packages/MSOnline/1.1.183.17</a>

&nbsp;

After you have installed MSOL, you will need to login to your Azure Active Directory using MSOL. In order to do this use the command :

&nbsp;

<em>Connect-MsolService</em>

&nbsp;

There should now be a popup asking you to login to Azure. Be sure to use a global admin account, otherwise you won’t be able to follow the next step to give an enterprise application an administrative role.

&nbsp;
<h1>Getting Started with AAD PowerShell V2.0</h1>
This document goes over install AAD Powershell V2.0:

<a href="https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0">https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0</a>

Similar to installing MSOL.

You will utilize the commands :

<em><span class="hljs-pscommand">Install-Module</span> AzureAD</em>

<em>Connect-AzureAD</em>

&nbsp;
<h1>Getting the ObjectID of the Enterprise Application</h1>
Now we need to get the Object ID from the Enterprise Application. There are two ways you can do this, you can get the Object ID from the powershell CMDlet, or you can go to the Azure Portal and get the object ID from the Enterprise Application under the properties blade.

&nbsp;
<h2>Using MSOL Powershell</h2>
Here we will take a look at a short script you can utilize in order to get the object ID of the Enterprise Application assuming you know the Application Registration Application ID.

&nbsp;

<em>$tenantID = "&lt;ID for Tenant&gt;"</em>

<em>$appID = "&lt;Application ID&gt;"</em>

<em>$msSP = Get-MsolServicePrincipal -AppPrincipalId $appID -TenantID $tenantID</em>

<em>$objectId = $msSP.ObjectId</em>

&nbsp;
<h2>Using AAD V2.0 PowerShell</h2>
You can also utilize AAD powershell v2.0 using the command :

&nbsp;

<em>$mysp = Get-AzureADServicePrincipal -searchstring &lt;your enterprise application name&gt; </em>

<em>$mysp.ObjectId</em>
<h2></h2>
Now we have the service principal stored in the variable $mysp. We will use it later to associate a role to the enterprise application.
<h2>Using the Azure Portal</h2>
To get the ObjectID through the Azure Portal, you will need to go to <a href="https://portal.azure.com/">portal.azure.com</a>. From there go to Azure Active Directory on the left side bar. Then to Enterprise Applications &gt; All Applications &gt; (Your Enterprise Application to set to an Admin Role) &gt; Properties &gt; Object ID.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/IN-AAD-portal.png"><img width="861" height="479" title="IN AAD portal" alt="IN AAD portal" src="https://msdnshared.blob.core.windows.net/media/2018/08/IN-AAD-portal_thumb.png" border="0" /></a>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/Enterprise-Application.png"><img width="871" height="563" title="Enterprise Application" alt="Enterprise Application" src="https://msdnshared.blob.core.windows.net/media/2018/08/Enterprise-Application_thumb.png" border="0" /></a>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image133.png"><img width="885" height="713" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb129.png" border="0" /></a>

&nbsp;

&nbsp;
<h1>Assigning an Administrative Role for an Enterprise Application</h1>
First please make sure you have the Administrative Role Name on hand as you will need it in order to add the Admin Role to the Enterprise Application. You can find all the roles here: <a href="https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles" title="https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles">https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles</a>

&nbsp;

In this Example we will be using Helpdesk Administrator

&nbsp;
<h2>Using MSOL to Add a Role Member</h2>
All we have to do is run the MSOL PowerShell cmdlet Add-MsolRoleMember.

This PowerShell Cmdlet is described in detail here : <a href="https://docs.microsoft.com/en-us/powershell/module/msonline/add-msolrolemember?view=azureadps-1.0" title="https://docs.microsoft.com/en-us/powershell/module/msonline/add-msolrolemember?view=azureadps-1.0">https://docs.microsoft.com/en-us/powershell/module/msonline/add-msolrolemember?view=azureadps-1.0</a>.

&nbsp;

For our intents and purposes, we can use this one liner in order to set the Enterprise Application to have the Admin Role :

&nbsp;

<em>Add-MsolRoleMember -RoleName "Helpdesk Administrator" -RoleMemberType ServicePrincipal -RoleMemberObjectId $objectId</em>

&nbsp;

Replacing ObjectID with the enterprise application’s ObjectID if you don't have $objectID saved.

We have successfully added the admin role to the enterprise application.

Note:  This may require some time to take effect.

&nbsp;
<h2>Using Azure AAD Powershell V2 to Add a Role Member</h2>
When using AAD PowerShell v2, you will need to get the object ID of the AAD role, you can utilize this command below to get the information.

&nbsp;

<em>$myAADRole = Get-AzureADDirectoryRole | Where-Object {$_.displayName -eq 'Helpdesk Administrator'}</em>

<em>$myAADRole.ObjectId</em>

&nbsp;

Now that we have the object IDs for the AAD role, we will need to get both object IDs to add the role to the enterprise application. We can use the command below :

&nbsp;

<em>Add-AzureADDirectoryRoleMember -ObjectId $myAADRole.ObjectId -RefObjectId $mysp.ObjectId</em>

&nbsp;

Replacing the variables with the object IDs if you don't have the variables saved.

We have successfully added the admin role to the enterprise application.

Note:  This may require some time to take effect.

&nbsp;
<h1>Conclusion</h1>
In this article we have gone over downloading MSOL and AAD V2.0, connecting with MSOL and V2.0, getting the object id for the enterprise application, getting the Application Role in MSOL and AAD V2.0, and giving the enterprise application the admin role using both AAD V2.0 and MSOL. you should now have an enterprise application that can do the actions that typically require a user with the admin privileges described in the role. If you have anymore issues feel free to open a support ticket or comment below and either one of our support engineers or I will try to assist you in this endeavor.]]></content:encoded>
    </item>
    <item>
      <title>How to Create a New Schema Extension Using the Microsoft Graph Explorer</title>
      <link>https://docs.microsoft.com/archive/blogs/aaddevsup/how-to-create-a-new-schema-extension-using-the-microsoft-graph-explorer</link>
      <pubDate>Tue, 21 Aug 2018 02:17:13 GMT</pubDate>
      <dc:creator><![CDATA[Frank Hu MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaddevsup/?p=3705</guid>
      <description><![CDATA[Introduction
This post is to provide a tutorial on how to create a schema extension utilizing the...]]></description>
      <content:encoded><![CDATA[<h1>Introduction</h1>
This post is to provide a tutorial on how to create a schema extension utilizing the Microsoft Graph Explorer. In this post we will, login to Microsoft Graph Explorer, create the V1 AAD Application, and make the Microsoft Graph Schema Extension call.

&nbsp;
<h1>Getting the Access Token</h1>
Please navigate to the Microsoft Graph Explorer at :

<a href="https://developer.microsoft.com/en-us/graph/graph-explorer" title="https://developer.microsoft.com/en-us/graph/graph-explorer ">https://developer.microsoft.com/en-us/graph/graph-explorer</a>

Once the page loads, on the left, below authentication you will see the button that says sign in with Microsoft. Click this and go ahead and login.

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image31.png"><img width="515" height="417" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb26.png" border="0" /></a>

&nbsp;

Login with an account that has the ability to modify AAD Application Schema Extensions.

Now that you have logged in with an account, click on modify permissions underneath your name.

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image32.png"><img width="619" height="376" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb27.png" border="0" /></a>

&nbsp;

From there find the permission required listed in the Create schemaExtension documentation.

The permission is listed here : <a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/schemaextension_post_schemaextensions" title="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/schemaextension_post_schemaextensions">https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/schemaextension_post_schemaextensions</a>

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image33.png"><img width="972" height="504" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb28.png" border="0" /></a>

&nbsp;

If you need help finding permissions for APIs, please go through this article : <a href="https://blogs.msdn.microsoft.com/aaddevsup/2018/05/21/finding-the-correct-permissions-for-a-microsoft-or-azure-active-directory-graph-call/" title="https://blogs.msdn.microsoft.com/aaddevsup/2018/05/21/finding-the-correct-permissions-for-a-microsoft-or-azure-active-directory-graph-call/">https://blogs.msdn.microsoft.com/aaddevsup/2018/05/21/finding-the-correct-permissions-for-a-microsoft-or-azure-active-directory-graph-call/</a>

This will help you when working with other Microsoft APIs that you need help finding permissions to. That being said, once you find the permission, click on the box next to it to check it.

<img src="https://i.imgur.com/vky5yju.png" />

&nbsp;

It will say that to change permissions you will need to login again. So when you press the modify permissions button, it will bring you back to the login page. From there, login and consent to the graph explorer application.

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image35.png"><img width="854" height="216" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb30.png" border="0" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image36.png"><img width="791" height="752" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb33.png" border="0" /></a>

&nbsp;

Now, by logging in you should have an access token for the Graph Explorer to use.

We can now press the run query button and get some information about ourselves, and have the correct permissions to make the call to the create Schema Extension Graph API.

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image38.png"><img width="981" height="640" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb35.png" border="0" /></a>

&nbsp;
<h1>Creating the AAD Application Registration</h1>
Now going back to the Azure portal, go to Azure Active Directory &gt; App Registrations &gt; New Application Registration

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image39.png"><img width="977" height="674" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb36.png" border="0" /></a>

&nbsp;

From here you are now at the Create AAD Application Blade, fill out the name and sign-on URL with your own values. They won’t matter too much in this example.

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image40.png"><img width="395" height="874" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb37.png" border="0" /></a>

&nbsp;

Now click on your new web app, and copy the Application ID.

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image41.png"><img width="768" height="462" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb38.png" border="0" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image42.png"><img width="780" height="389" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb39.png" border="0" /></a>

&nbsp;
<h1>Making the createSchemaExtensions Call</h1>
Now we have everything we need to make the create schema extensions call from the Microsoft Graph using the Graph Explorer. The nature of the createSchemaExtensions call is to add a schema extension to the application that is making the call. Since we are using the Graph Explorer, it will try to add it to the Graph Explorer’s AAD Application. You won’t be allowed to do this, as it is managed by Microsoft. So we have to set the Application ID of the application we would like to add the schema extension to in the body of our request. This is actually described in the documentation, although not very obvious, in the owner attribute for the request body.
<blockquote><em>owner
String
(Optional) The <code>appId</code> of the application that is the owner of the schema extension. This property can be supplied on creation, to set the owner. If not supplied, then the calling application's <code>appId</code> will be set as the owner. So, for example, if creating a new schema extension definition using Graph Explorer, you <strong>must</strong> supply the owner property. Once set, this property is read-only and cannot be changed.</em></blockquote>
I am going to copy the request from the documentation and put it into my request body, and then add the owner attribute with my application ID. You must also modify the ID, because if you wish to utilize the Domain_schema ID format, you must provide a domain that you own.

&nbsp;

So now my request looks like :

{
"id":"2cd76e65",
"description": "Graph Learn training courses extensions",
"owner" : "3f434c47-5229-40fc-be95-e6e1583ac4fc",
"targetTypes": [
"Group"
],
"properties": [
{
"name": "courseId",
"type": "Integer"
},
{
"name": "courseName",
"type": "String"
},
{
"name": "courseType",
"type": "String"
}
]
}

In addition to that I also copied and pasted the request endpoint in the request example into the graph explorer URL box.(https://graph.microsoft.com/v1.0/schemaExtensions)

I also then changed the blue box on the left of the URL box from GET to POST as we want to create the schema extension.

<a href="https://msdnshared.blob.core.windows.net/media/2018/08/image44.png"><img width="1052" height="672" title="image" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/08/image_thumb41.png" border="0" /></a>

&nbsp;
<h1>Conclusion</h1>
In this post we have gone through, logging in, getting the right permissions, modifying the request body example for your application, and then adding the schema extension to your application. For more information on the schema extension please go through the schema extension attribute documentation here : <a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/schemaextension" title="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/schemaextension">https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/schemaextension</a>

You will see the different resource types and other information that you can use to create your Schema Extension.

If you have any issues, feel free to open a support ticket and one of our support engineers will reach out to you as soon as possible to resolve the issue. Also feel free to comment below and I will try to reach out to you to resolve the issue.]]></content:encoded>
    </item>
  </channel>
</rss>