Cannot connect to Azure Files share

Ash 56 Reputation points
2022-12-20T02:32:03.803+00:00

I have set up an Azure Files share with Azure AD Kerberos as the source.

When running the connection script (Active Directory authentication) I get the error below. Please help!

The PC is Azure AD-joined, with the user logging in with an Azure AD account.

The Azure website states: "Azure AD Kerberos authentication allows users to connect to Azure Files over the internet without requiring a line-of-sight to domain controllers."

New-PSDrive : The system cannot contact a domain controller to service the authentication request. Please try again later
At C:\Users\testuser\Desktop\connect-files-share.ps1:4 char:5

  • New-PSDrive -Name Z -PSProvider FileSystem -Root "\storage ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : InvalidOperation: (Z:PSDriveInfo) [New-PSDrive], Win32Exception
  • FullyQualifiedErrorId : CouldNotMapNetworkDrive,Microsoft.PowerShell.Commands.NewPSDriveCommand
Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,415 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
25,048 questions
0 comments No comments
{count} votes

Accepted answer
  1. Luke Murray 11,436 Reputation points MVP Volunteer Moderator
    2022-12-20T21:38:16.087+00:00
    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Ravi Kanth Koppala 3,391 Reputation points Microsoft Employee Moderator
    2022-12-20T02:46:35.35+00:00

    @Ash ,
    It looks like you are getting the error "The system cannot contact a domain controller to service the authentication request. Please try again later" when using the New-PSDrive cmdlet to connect to an Azure Files share using Azure AD Kerberos authentication.

    There are a few things you can try to troubleshoot this issue:

    • Make sure that the client machine can communicate with the domain controller. You can test this by pinging the domain controller or trying to access other resources on the domain.
    • Check the status of the Azure AD Domain Services instance in the Azure portal to ensure it is running and healthy.
    • Ensure that the Azure AD Domain Services instance is configured correctly for the Azure AD tenant. You can check this by going to the Azure AD Domain Services page in the Azure portal and looking for any error messages or warning icons.
    • Check the event logs on the client machine for any relevant error messages.
    • Make sure that the client machine is configured correctly for Kerberos authentication. This includes setting the correct DNS server, time synchronization, and Kerberos configuration settings.

    I hope this helps! Let me know if you have any further questions or need more information.

    ----------

    Please "Accept as Answer" and Upvote if any of the above helped so that it can help others in the community looking for remediation for similar issues.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.