ios - Azure Mobile Services Active Directory Login unauthorized -
ios - Azure Mobile Services Active Directory Login unauthorized -
my setup ios .net backend of azure mobile services
i have followed guide active directory authentication here http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-ios-adal-sso-authentication/ trying debugging locally hosted on iis.
i have set ms_masterkey , ms_applicationkey noted here in web.config https://social.msdn.microsoft.com/forums/windowsapps/en-us/23e7163b-dad5-46ae-bf9b-c71ab067e535/microsoftwindowsazuremobileservicesmobileserviceinvalidoperationexception-the-request-could-not?forum=wpdevelop
and have added ms_aadclientid , ms_aadtenants key appsettings in web.config also.
i able visit http://localhost/mobileservice/help , come in application key password , access help there.
on ios though, authenticating adalios library succeeds authentication , returns valid access token resource. although on passing mobile service 401 unauthorised response assuming due application key somehow. result passing mobile services client so.
let payload = ["access_token": result.accesstoken] client.loginwithprovider("aad", token: payload) { user, error in } any ideas or suggestions on missing , why still returning 401 status login call?
edit:the request headers are:
accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; "user-agent" = "zumo/2.0 (lang=objective-c; os=--; os_version=--; arch=iossimulator; version=2.0.0.0)"; "x-zumo-application" = <actual application key here>; "x-zumo-installation-id" = "db14cbcd-98ea-4014-ad6e-62e0cf02a9d0"; "x-zumo-version" = "zumo/2.0 (lang=objective-c; os=--; os_version=--; arch=iossimulator; version=2.0.0.0)"; the response is:
<nshttpurlresponse: 0x7fa882f81240> { url: http://localhost/mobileservice/login/aad } { status code: 401, headers { "content-length" = 0; date = "sun, 09 nov 2014 22:39:16 gmt"; server = "microsoft-iis/8.0"; "www-authenticate" = "basic realm=\"service\""; "x-powered-by" = "asp.net"; } } edit: also doing post fiddler login/aad endpoint responds instantly 401 response, having app key or master key in header , or without access_token body
the problem in configuration in web.config. way found redoing , diffing changes
my problem trailing space in value key ms_aadaudience key.
ios .net azure azure-mobile-services azure-active-directory
Comments
Post a Comment