Search code examples
azuremicrosoft-graph-apiazure-ad-graph-apimicrosoft-graph-sdks

[Migrate from Azure AD Graph to Microsoft Graph]: how to get the parameters to use the Microsoft Graph API


We want to migrate our .NET app from using Azure AD Graph to Microsoft Graph API. Currently we're using the package Microsoft.WindowsAzure.ConfigurationManager and getting the parameters required for Graph API from cloudConfiguration manager Like below

AADGraphApiApplicationEndpoint = CloudConfigurationManager.GetSetting("ida_AADGraphApiApplicationEndpoint");
 GraphAPIUrl = CloudConfigurationManager.GetSetting("ida_AADGraphApi");

Noticed that the package mentioned above is deprecated. My question is as I want to migrate to use the Microsoft Graph API, is there any other packages that I can use to get the parameters and then use those in my Graph API calls.

New to this and still exploring how to migrate my app. Appreciate some inputs and suggestions.


Solution

  • First if you are migrating from AAD Graph to MS Graph, check Migrate your apps from Azure AD Graph to Microsoft Graph Guide

    That said, Using Microsoft Graph is pretty simple. All you need is an app registration on Azure Portal, Add proper permissions as per what your app is to access from Graph API then add user authentication or app only authentication. There is a guide here

    As for Microsoft.WindowsAzure.ConfigurationManager that you are using, AFAIK its just a configuration loader, you can check Azure App Configuration and Key Vault