Example #1
0
        private async static Task <string> GetManagedInstanceIdAsync(HttpRequest req)
        {
            var parameters = await FunctionUtils.ParseRequestAsync <AssignDirectoryReadersRoleFunctionRequest>(req);

            if (string.IsNullOrEmpty(parameters.Id))
            {
                throw new Exception(@"Please pass Managed Instance 'id' in the request body.");
            }

            return(parameters.Id);
        }