Hi All,
I need some help/advice to integrate azure active directory info with Position entity(built in).
Is it possible to grab all position(Job) related data from aad and feed those to Position?
Regards
Thanks, This is what I was looking for :D
Hi Jeesung,
Could you share me more details of your business background?
Generally, We call Dynamics 365 Web API with AAD to acess entities/records.
It seems that you want to export data from external resource in AAD and add them into position entity in Dynamics?
1. You could try Microsoft Flow to get retrieved data from your AAD and make a connection to Dynamics.
This article provides a simple tutorial about whole process.
(author took custom Connector to AAD in the article, you could also try Invoke an HTTP request from existed Flow action)
2. The second method is you get authroized token and retrieve data in C# and register it as a plug-in in Dynamics system.
My working code for auth:
public static String token;
public static String redirectUrl = "api.yourservice.com";
public static async void queryByWebAPI()
{
try
{
String serviceUrl = " yourservice.com";
String username = "";
String password = "";
string clientId = "";
String authUri = "https://login.microsoftonline.com/common/";
var cred = new UserPasswordCredential(username, password);
var authContext = new AuthenticationContext(authUri);
AuthenticationResult result = await authContext.AcquireTokenAsync(serviceUrl, clientId, cred);
token = result.AccessToken;
yourAction(token, redirectUrl);
}
catch (Exception ex)
{
Console.WriteLine("Exception caught - " + ex.Message);
}
}
3. A more OOB way is you could export position entity template and fill rows data from your AAD JSON output. (You need feed data manually)
You could try postman to save result and convert JSON output to excel with third party tools.
Regards,
Clofly
André Arnaud de Cal...
292,074
Super User 2025 Season 1
Martin Dráb
230,900
Most Valuable Professional
nmaenpaa
101,156