azure-mobile-services

How to safely call Azure Function with function level authorization in Xamarin mobile app?

爷,独闯天下 提交于 2019-12-01 03:13:46
问题 I'm making an iOS/Android app using Xamarin (not Xamarin.Forms, just regular Xamarin). I'm using the shared library set up rather than PCL. I want my app to call an Azure function but I'm unsure of the safest/best way to handle this. I have it set to "Function" for the "Authorization level". The test URL includes the "?code=..." portion in it. I was under the impression that if I put that in my C# code with the "code" value exposed that it was considered a bad idea from a security perspective

Authenticate against an Azure Mobile Service App with ADAL.js acquired token

这一生的挚爱 提交于 2019-12-01 02:22:27
问题 I'm trying to authenticate a HTML app against an Azure Mobile Service app. The Setup Both apps use AAD as authentication backend, so both apps have an application registered in the Active Directory: Azure Mobile Service app: configured as described in https://azure.microsoft.com/en-gb/documentation/articles/mobile-services-how-to-register-active-directory-authentication/ I edited the manifest to enable the client flow Enable "single sign-on and read users profiles" under "permissions to other

Validating Azure Mobile Service token in a WebApi service

心已入冬 提交于 2019-12-01 01:34:21
I am trying to implement authenticating and identification on a cross-platform mobile application consuming a WebApi service. My plan is to export the authentication to a federated cloud service, such as the new Azure Mobile Service. The Client Mobile application will consume the Mobile Service authentication flow, get a token, and will than have it sent inside the requests' headers to the WebApi, which in turn will validate it and extract the UserId from it. Assuming I already configured the WebApi the validate JWT tokens using DelegatingHandler interceptor, is it possible to validate tokens

Desktop client flow for MicrosoftAccount access to Azure Mobile Service API

折月煮酒 提交于 2019-12-01 00:22:41
I have followed Adrian Halls book to create a cross platform app with a Mobile Service API backend. I have successfully got unsecured access to the backend working from Android, iOS and Desktop (WPF) clients. I am moving on to adding security to the API using the Authorise attribute. I would like to add social authentication using MicrosoftAccount (formerly passport/Live ID). Since Adrian wrote his book the Microsoft.Azure.Mobile.Client and the authentication and authorisation landscape seem to have moved on. The samples given in the book no longer build and Microsoft's social authentication

Get user info like name, email Id etc from authentication token in .NET Backend Azure Mobile Service

假装没事ソ 提交于 2019-11-30 22:42:45
I am using Azure Mobile Service to add authentication to my Windows Store app. Following this article from Mobile Services documentation I am able to get the UserId as well as MobileServiceAuthenticationToken (both for Google as well as Microsoft Account) My question is how do I get user info like name, email Id etc. using MobileServiceAuthenticationToken in a .NET backend mobile service. I have gone through various articles explaining how this is done in Javascript Backend mobile service but couldn't find anything properly implemented in C# + .NET backend mobile service. Any pointers

Validating Azure Mobile Service token in a WebApi service

久未见 提交于 2019-11-30 20:33:19
问题 I am trying to implement authenticating and identification on a cross-platform mobile application consuming a WebApi service. My plan is to export the authentication to a federated cloud service, such as the new Azure Mobile Service. The Client Mobile application will consume the Mobile Service authentication flow, get a token, and will than have it sent inside the requests' headers to the WebApi, which in turn will validate it and extract the UserId from it. Assuming I already configured the

POST data from Android to Web API returns 404

本秂侑毒 提交于 2019-11-30 17:04:49
I'm trying to send data from my Android client as a POST request to my Web API Backend but it returns a 404 response code. Here's my code: Backend : [HttpPost] [Route("api/postcomment")] public IHttpActionResult PostComment(string comment, string email, string actid) { string status = CC.PostNewComment(comment, email, actid); return Ok(status); } Android Code: HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://MYWEBADDRESS.azure-mobile.net/api/postcomment"); String mobileServiceAppId = "AZURE_SERVICE_APP_ID"; try { List<NameValuePair> nameValuePairs = new

Invalid update: invalid number of rows in section

本秂侑毒 提交于 2019-11-30 09:28:19
I am working on a project using Microsoft Azure services . In that while deleting a row I am getting this error: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (2) must be equal to the number of rows contained in that section before the update (2), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved

POST data from Android to Web API returns 404

北城以北 提交于 2019-11-29 23:54:05
问题 I'm trying to send data from my Android client as a POST request to my Web API Backend but it returns a 404 response code. Here's my code: Backend : [HttpPost] [Route("api/postcomment")] public IHttpActionResult PostComment(string comment, string email, string actid) { string status = CC.PostNewComment(comment, email, actid); return Ok(status); } Android Code: HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://MYWEBADDRESS.azure-mobile.net/api

Use SQL Server view in NEW Azure App Service

流过昼夜 提交于 2019-11-29 16:15:16
I am new to Azure App Service. I've created a view in Azure database to get data across several tables. Now I want to use the data from this view in my Cordova App using the Azure Mobile Service (MobileService.GetTable...). I found several articles in the web that describe how to do that in Classic Azure Portal. But I need a solution for the NEW Azure App Service with Node.js Backend. What is the syntax to return data from a view as an Azure table? var table = module.exports = require('azure-mobile-apps').table(); table.read(function (context) { // *** Need code to return data from sql view **