none
Access File on Network Share using embedded credentials

    Question

  • I have a file on a network share that requires credentials to access, and I would like to embed the credentials inside the app.

    Is there a way to do this?

    Using Windows 10 Mobile, Build 10.0.14393, Version 1607
    Wednesday, November 28, 2018 6:50 PM

All replies

  • Hi,
    I think you need to detail the scenario. May I have a few questions about your requirement?
    1. The file to share on the network is in what environment, Windows, Linux or other OS? 
    2. How did you share the file, what category of Credential did you use?
    3. Is the client to access and the file server on the networks in the domain?
    4. Do you think FTP is an option?

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 29, 2018 9:47 AM
    Moderator
  • 1. The file share is on a Windows Server (the folder has Everyone set with read permissions)

    2. We are using domain credentials for auth (Using a Windows AAD server to auth)

    3. Using a third party app (Network File Manager 10, from the Windows stroe), I was able to supply the credentials and gain access. However, in my application, without credentials I am unable to.

    4. It very well could be, if need be, but this solution is working fine on Windows Surface devices as well as my computer and would like to keep things the same.


    • Edited by Steve Fonseca Thursday, November 29, 2018 6:51 PM More info provided
    Thursday, November 29, 2018 4:21 PM
  • Hi,

    >> 4. It very well could be, if need be, but this solution is working fine on Windows Surface devices as well as my computer and would like to keep things the same.

    Did you mean that the UWP app with credentials works well on Surface and your computer but the app does not work on Windows 10 Mobile? How did you retrieving user credentials in your App? 

    Best regards,

    Roy



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 3, 2018 9:53 AM
    Moderator
  • On the surface, simply enabling the "broadFileSystemAccess" capability was enough. I'm using the Windows.Security.Credentials.PasswordVault API for the handling of credentials. But, do not know how to set them for use within the app for folder/file access.
    Monday, December 3, 2018 6:40 PM
  • Hi,

    PasswordVault is a reference for Credential Locker. Credential Locker API stores the username and password for your user and easily retrieve them and log the user in automatically the next time they open your app, regardless of what device they're on, and the credentials don’t expire.

    So you can access the folder/file shared in network after retrieving the user credential with user name and password. One more things I want to confirm with you. You said that enabling the "broadFileSystemAccess" capability was enough on surface, did you retrieve credential with Windows.Security.Credentials.PasswordVault API on surface? Could the app which works fine on surface also work on Windows 10 Mobile device?

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 4, 2018 10:01 AM
    Moderator
  • Either of the two apps work just fine on the Surface Device, where neither work on the mobile. Credentials were not needed to be stored or retrieved.
    Tuesday, December 4, 2018 6:02 PM
  • Hi,

    According to your previous reply, you are trying to use the AAD(Azure AD), right? Did the Window 10 Mobile device join the AAD? You need join the device to Azure AD,  so that the device can exclusively use a credential owned by your organization, and you can ensure users sign in using the sign-in requirements of your organization. Please refer to this document.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, December 5, 2018 10:49 AM
    Moderator
  • No, we are using on site AD for credentials.
    Wednesday, December 5, 2018 4:28 PM
  • Hi,
    As far as I know, Windows 10 Mobile doesn't support DirectAccess and can not be join as a computer in onsite Active Directory. I think you can consider using FTP to share the file instead of Network File Manager,  you can also set FTP credential with user name/password.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 6, 2018 9:56 AM
    Moderator