PublicClientApplication it's an ambiguous reference.

Javier R 211 Reputation points
2020-05-09T20:25:00.52+00:00
'PublicClientApplication' is an ambiguous reference between 'Microsoft.Identity.Client.PublicClientApplication' and 'Microsoft.Graph.PublicClientApplication'   


 private readonly PublicClientApplication _identityClientApp;

        public AuthenticationService(string clientId)
        {
            if(string.IsNullOrWhiteSpace(clientId))
            {
                throw new ArgumentNullException("Client id cannot be null or empty", nameof(clientId));
            }

            ClientId = clientId;
           _identityClientApp = new PublicClientApplication(clientId);
            GraphClient = GetAuthenticatedClient();
        }
        /// <summary>
        ///  get the current application id
        /// </summary>

this code is located on github at repositio Onedrive-File-Explorer.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,320 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Daniele 1,996 Reputation points
    2020-05-10T06:34:43.713+00:00

    Try to change line 14 with

    _identityClientApp = new Microsoft.Identity.Client.PublicClientApplication(clientId);