dynamics crm - MS CRM 2013 Online OAuth unsupported_grant_type - authorization_code -


we have asp.net mvc 4 application runs inside iframe in ms crm 2013. web application uses ms crm web services (organization web service) retrieve , save data. so, needs authenticate. on-premises using windows authentication , impersonate logged user in ms crm (user id passed iframe url). works charm.

however ms crm 2013 online, since want avoid storing user credentials in our application, have chosen use oauth. suggestion how achieve same in different way welcome since not seam right use method non-dot-net clients.

we able code calling: https://login.windows.net/{0}/oauth2/authorize?response_type=code&resource={1}&client_id={2}&redirect_uri={3}. when ask token, 400 bad request error.

request

method: post

url: https://login.windows.net/{0}/oauth2/token?api-version=1.0

header:

user-agent: fiddler host: login.windows.net content-length: 563 content-type: application/x-www-form-urlencoded 

body:

grant_type=authorization_code&code={0}&redirect_uri={1}&resource={2} 

response

{"error":"unsupported_grant_type","error_description":"acs70003: access grant \u0027authorization_code\u0027 not supported...} 

the comments under article (http://blogs.msdn.com/b/aadgraphteam/archive/2013/05/17/using-oauth-2-0-authorization-code-grant-for-delegated-access-of-directory-via-aad-graph.aspx?commentposted=true#commentmessage) suggest azure ad bug should have been fixed now, guess. doing wrong?

thanks in advance,

enoch


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -