<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dropbox.Api.Sharing.ListFileMembersAsync Invalid Path after passing FileMEtadata.Id in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Dropbox-Api-Sharing-ListFileMembersAsync-Invalid-Path-after/m-p/528956#M1975</link>
    <description>&lt;P&gt;That could be it, our test environment probably never reached that case, thank you.&amp;nbsp; I will mark this as the answer when I hear back from the customer.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 18:33:45 GMT</pubDate>
    <dc:creator>STEALTHbits</dc:creator>
    <dc:date>2021-06-24T18:33:45Z</dc:date>
    <item>
      <title>Dropbox.Api.Sharing.ListFileMembersAsync Invalid Path after passing FileMEtadata.Id</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Dropbox-Api-Sharing-ListFileMembersAsync-Invalid-Path-after/m-p/528881#M1973</link>
      <description>&lt;P&gt;A customer of ours is running into the error below:&lt;/P&gt;
&lt;P&gt;System.ArgumentOutOfRangeException: Value should match pattern '\A(?:((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?)\z' Parameter name: file&lt;/P&gt;
&lt;P&gt;at Dropbox.Api.Sharing.ListFileMembersArg..ctor(String file, IEnumerable`1 actions, Boolean includeInherited, UInt32 limit)&lt;/P&gt;
&lt;P&gt;at Stealthbits.StealthAUDIT.DataCollectors.Dropbox.Tasks.Scan.DropboxScanHelper.&amp;lt;&amp;gt;c__DisplayClass58_4.&amp;lt;ProcessResources&amp;gt;b__6()&lt;/P&gt;
&lt;P&gt;at Stealthbits.StealthAUDIT.DataCollectors.Dropbox.Tasks.Scan.DropboxScanHelper.AwaitReturn[TResult](Func`1 callback)"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I censored the path for the customer but the structure is the same as the path below.&lt;BR /&gt;Failed to process resource /3- Folder1/1 - Folder2/Folder3 - Folder3 - Folder3/1 - Folder4/01.23.4567: File File_File_01.23.4567.pdf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code using Dropbox 4.9.4, I will try updating to 5.5.0 (6.8 is giving me dependency errors):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;userClient = client.AsMember(member.Profile.TeamMemberId);
adminClient = userAdmin.WithPathRoot(new PathRoot.NamespaceId(namespaceID));
var FolderContents = AwaitReturn(() =&amp;gt; adminClient.Files.ListFolderAsync(namespaceID, false, true, false, true));
var entries = FolderContents.Entries;
while (FolderContents.HasMore)
{
    FolderContents = AwaitReturn(() =&amp;gt; adminClient.Files.ListFolderContinueAsync(FolderContents.Cursor));
    foreach (var entry in FolderContents.Entries)
    {
	    entries.Add(entry);
    }
}


foreach (Metadata resource in entries)
{
    if (resource.IsFile)
    {
        List&amp;lt;Sharing.UserMembershipInfo&amp;gt; users = new List&amp;lt;Sharing.UserMembershipInfo&amp;gt;();
        FileMetadata fileData = resource.AsFile;
        //Errors here
        var fileMembers = AwaitReturn(() =&amp;gt; 
        userClient.Sharing.ListFileMembersAsync(fileData.Id));
        users.AddRange(fileMembers.Users);

        while (!String.IsNullOrEmpty(fileMembers.Cursor))
        {
            fileMembers = AwaitReturn(() =&amp;gt; userClient.Sharing.ListFileMembersAsync(fileMembers.Cursor));
							 
            users.AddRange(fileMembers.Users);
        }

        foreach (var member in users)
        {
            //Process member
        }
    }
}


TResult AwaitReturn&amp;lt;TResult&amp;gt;(Func&amp;lt;Task&amp;lt;TResult&amp;gt;&amp;gt; callback)
{
    using (Task&amp;lt;TResult&amp;gt; task = callback())
    {
	    task.Wait();
	    return task.Result;
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 12:53:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Dropbox-Api-Sharing-ListFileMembersAsync-Invalid-Path-after/m-p/528881#M1973</guid>
      <dc:creator>STEALTHbits</dc:creator>
      <dc:date>2021-06-24T12:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox.Api.Sharing.ListFileMembersAsync Invalid Path after passing FileMEtadata.Id</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Dropbox-Api-Sharing-ListFileMembersAsync-Invalid-Path-after/m-p/528914#M1974</link>
      <description>&lt;P&gt;I see you're making the second ListFileMembersAsync call like this:&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;userClient.Sharing.ListFileMembersAsync(fileMembers.Cursor)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;However, to retrieve more results via the cursor, you should actually call &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Sharing_Routes_SharingUserRoutes_ListFileMembersContinueAsync_1.htm" target="_self"&gt;ListFileMembersContinueAsync&lt;/A&gt;, not ListFileMembersAsync.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 15:48:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Dropbox-Api-Sharing-ListFileMembersAsync-Invalid-Path-after/m-p/528914#M1974</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-06-24T15:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox.Api.Sharing.ListFileMembersAsync Invalid Path after passing FileMEtadata.Id</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Dropbox-Api-Sharing-ListFileMembersAsync-Invalid-Path-after/m-p/528956#M1975</link>
      <description>&lt;P&gt;That could be it, our test environment probably never reached that case, thank you.&amp;nbsp; I will mark this as the answer when I hear back from the customer.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 18:33:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Dropbox-Api-Sharing-ListFileMembersAsync-Invalid-Path-after/m-p/528956#M1975</guid>
      <dc:creator>STEALTHbits</dc:creator>
      <dc:date>2021-06-24T18:33:45Z</dc:date>
    </item>
  </channel>
</rss>

