I have made a MVC application and I'm trying to add users to application.
The validation of user needs to be done through Azure AD for which Graph API is used.
Internal users presented in Azure AD are added successfully.
External users are also presented in Azure AD but I get the error
User not present in AD
I have tried applying all filters but still getting the same issue.
Code used:
var authProvider = await GetAuthProvider();
GraphServiceClient graphClient = new GraphServiceClient(authProvider);
var user = await graphClient.Users[email].Request().GetAsync();
return true;
where email is the string of email passed from application. The code works fine for internal users but not for external users.