Generating Cosmos DB Auth Tokens in Postman

If you read the official article that describes how access control works in Cosmos DB, you’ll see this handy Node.js function for generating authentication tokens using a master key: var crypto = require(“crypto”); function getAuthorizationTokenUsingMasterKey(verb, resourceType, resourceId, date, masterKey) { var key = new Buffer(masterKey, “base64”); var text = (verb || “”).toLowerCase() + “\n” + (resourceType… Continue reading Generating Cosmos DB Auth Tokens in Postman