DocumentDb User Data Segregation <p>I'm testing out the recently released DocumentDb and can't find any documentation indicating best practice on how to perform user data segregation. </p> <p>I imagine the rough design would be:</p> <ul> <li>Authenticate the user and create new/obtain existing user id</li> <li>On document insert inject the user id into the document</li> <li>On read of document/collection of documents query where document user id = current user id</li> </ul> <p>I'm creating an AngularJs application and currently use an Azure Sql Database combined with Azure Mobile Services. </p> <p>Mobile services handles the user authentication and also the server side user data segregation by the use of data script javascript functions:</p> <p>e.g. </p> <pre><code>function insert(item, user, request) { item.userId = user.userId; request.execute(); } </code></pre> <p>Any suggestions on what would be the technique for secure user data segregation from AngularJS using DocumentDB?</p>