RE: Authenticate twice for Web API and Organization URL - Using REST ?
Hi,
Yes it is possible to interact with CRM web api using access token which you have obtained from first step without user interaction and they will not have to enter their credentials again.
Pass Access Token in header as Bearer.
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json; charset=utf-8");
myHeaders.append("Prefer", "odata.maxpagesize=2");
myHeaders.append("Prefer", "odata.include-annotations=\"*\"");
myHeaders.append("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IllNRUxIVDBndmIwbXhvU0RvWWZvbWpxZmpZVSIsImtpZCI6IllNRUxIVDBndmIwbXhvU0RvWWZvbWpxZmpZVSJ9.eyJhdWQiOiJodHRwczovL21tZGV2LmNybS5keW5hbWljcy5jb20iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8wOTVmMDk3Ni1iZjY2LTRkNzYtYmYyOS0wZmJhYjA4ODRlY2IvIiwiaWF0IjoxNTg2MDA4NTc1LCJuYmYiOjE1ODYwMDg1NzUsImV4cCI6MTU4NjAxMjQ3NSwiYWlvIjoiNDJkZ1lMRFZ1Sk1UcEhqY2I4ZU8yb3ViYzZkK0FnQT0iLCJhcHBpZCI6ImRiYmZlZDAzLTUwMjMtNDEwYi1iNTg4LThkYjcwYTYxYzhhZiIsImFwcGlkYWNyIjoiMSIsImlkcCI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzA5NWYwOTc2LWJmNjYtNGQ3Ni1iZjI5LTBmYmFiMDg4NGVjYi8iLCJvaWQiOiI2MTgyMTgzOS0xZWUwLTQwOGUtOTk3ZC1mYjE1OGY0Yzk2ODYiLCJzdWIiOiI2MTgyMTgzOS0xZWUwLTQwOGUtOTk3ZC1mYjE1OGY0Yzk2ODYiLCJ0aWQiOiIwOTVmMDk3Ni1iZjY2LTRkNzYtYmYyOS0wZmJhYjA4ODRlY2IiLCJ1dGkiOiIzd0ZneGl1VWpFYS1BdmJ1TW1NT0FBIiw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