Dynamics CRM Online and Impersonation - dynamics-crm-2011

I'm using a code from CRM2011KIT "CRM Online from PHP". And I'm able to create or update entities without any problem from PHP.
But now we need to use impersonation, and I cannot find any example or documents how to do that using LiveID authorization, CRM Online and simple XML requests (of course I'm not able to use SDK from PHP).
I will be glad to hear that somebody solve the problem like mine or have some idea. But I even cannot imagine where to place "CallerID" in current soap XML requests

Have you looked at this?
CRM Online 2011 WebServices - SOAP Only Client
They do bare SOAP requests and there is support for LiveID & Office365 logins

Related

How to access Sharepoint site's document library via Microsoft Graph API?

I'm working on accessing document libraries for Sharepoint sites via Mircosoft Graph, but haven't had any luck so far.
Here is my setup:
I have two sites
https://mydomain.sharepoint.com
https://mydomain.sharepoint.com/teams/MyTestSite
When I make an api call to https://graph.microsoft.com/v1.0/drives, the response doesn't contain id of document library for second site (https://mydomain.sharepoint.com/teams/MyTestSite).
I have gone through documentation and haven't found anything on how to accomplish this. If anyone got any idea about this, please share.
Thanks.
I was able to figure out a solution for this. A sharepoint site is represented as a Group in Office 365. I found that out by doing some hit and trial.
So, after looking up their documentation for anything related to a Group, I got to this: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/group
And, by using the List groups endpoint I was finally able to get a list of all the Sharepoint sites which the authenticated user can access.
This API call requires Group.Read.All scope while requesting access token and only Admin users can authorize this scope. So, this will need a separate interface for Admin to list groups, potentially store the group-user mapping on my app for the user to be able to make api call (/groups/{group-id}/drive/items/{item-id}) related to the drive.
The V1.0 API has a way to list your doc lib as follows
GET https://graph.microsoft.com/v1.0/sites/mydomain.sharepoint.com:/Teams/MyTestSite:/drives
Hope this helps.
The beta API also exposes a Sharepoint endpoint.
You can also use the path if you already know your site structure:
GET https://graph.microsoft.com/beta/sharepoint:/sites

Authenticating Excel Task Pane app to CRM Online

I would like to write an Excel Task Pane app to interact with CRM Online - to take data from the Excel worksheet, process it and push it into a CRM entity record. My Excel users are on Office 365, as is CRM Online (obviously). We are using ADFS 2.0.
The specific problem I am experiencing is that I do not know how to get authentication to work for the Task Pane app: specifically, to the OData endpoint via JavaScript. Authentication is not my area, so I don't know how to precisely phrase this next requirement, but as we are using Office 365/CRM Online/ADFS then I need to use the logged-in user's Windows AD credentials to authenticate the request.
As far as I can tell, it is not possible to authenticate the Task Pane app directly with CRM Online, and I would like to know if that is known to be true, and if not what method(s) I can use.
I do know that there is a hack for indirect authentication published by a couple of people (http://survivingcrm.com/2013/12/connecting-crm-online-odata-feed-excel-2013-power-query/ or http://www.crmconsult.co.uk/connecting-to-crm-20112013-with-odata-in-excel-2013/) which authenticates the user via the CRM plug-in and then allows other OData connections to succeed - but it doesn't work for me, and I'm averse to rolling out functionality to users which relies on back-door methods.
In the end, I ended used using SOAP in VBA instead of oData in the Task Pane, which meant I was able to use Jason Lattimer's hard work from http://jlattimer.blogspot.co.uk/2015/02/soap-only-authentication-using-vba.html - I don't think there is any way I would have figured out the Authentication piece without that post, so many thanks to him.

Programmatically read/write Excel Web App on Office 365

I'd like to read and write cells on an Excel Web App hosted at Office 365. There seems to be conflicting information online whether API access to EWA is even possible.
I would expect to use some of the RESTful APIs, such as the following:
https://[myoffice365site]/personal/[myusername]/Documents/[myworkbook].xlsx/model
But when I do, I receive a generic 404 error. I've also been unable to find any tokens or API keys in my Office 365 account.
Has anyone had any luck accessing an Excel Web App using C# or Javascript?
Thank you!
hbeam
Yes, we do have an API that allows reading and writing to cells in Excel Web App via a JavaScript library. This code needs to be running in an "App for Excel" which is embedded in the Excel document. Here's some documentation to get you started: http://msdn.microsoft.com/en-us/office/dn448457
If you reply with some additional information about what you are trying to accomplish with the app, I can give further guidance on which API to use and how to use it.
A RESTful API to accomplish what you're asking is not currently available. We've heard from many developers and customers who are interested in that type of programmability, and we'll take your feedback into account.
Thanks for the question!
-Michael

how an utility application connects with all three deployment types of CRM

I am working with an utility application which has user authentication(i.e. it takes username password from users as input). Previously I worked with CRM online. Now requirement is this utility should be able to connect all three deployment types of CRM (i.e. Onpremise, Online, IFD).I am not sure how to do it. I was using crmservice.cs and deviceidmanager.cs for connection with CRM.
From other online resources I found that in connection string if I add Authentication Type="Integrated"/"AD"/"SPLA"/"Passport" , it should work.
So If I write my connection string like
connectionString="Authentication Type="Integrated";Data Source= LINE500\sage;Initial Catalog=cs3live; Integrated Security=false; User Id=XXXXXXXX;Password=XXXXXXXX"
Is this gonna work? FYI, I have only CRM online trial account to verify my code.So I need your help on this.
Thanks.
a CRM Online environment can use Windows Live ID or Office 365 authentication, DeviceID and DevicePassword are necessary only when connecting with Windows Live ID credentials. So you need to know which authentication type is in use in your CRM.
To be able to connect to different environments I suggest to use the Simplified Connection, you can find more information here:
https://stackoverflow.com/a/15930366/2191473
and here:
Sample: Simplified Connection Quick Start using Microsoft Dynamics CRM

How to Connect to CRM Dynamics Online Odata endpoint LinqPad?

I'm able to connect to self-hosted CRM sites just fine with the default Odata driver within LinqPad. The URI I use in the "WCF Data Services (OData) Connection" dialog for self-hosted is in the format http://MyServer.com/MyOrgName/xrmservices/2011/OrganizationData.svc. The user name is in the format "domain\username".
When I attempt to follow the same format for an CRM Online instance, it doesn't work.
I'm guessing it's either because of the https, or the windows live credentials, but don't know what steps to take to fix the problem...
Please note, I want to use the odata provider, not the CRM 2011 provider. The odata provider gives me the URL to retrieve the data which is extremely helpful for javascript. The CRM 2011 provider gives the fetch XML, which isn't what I want to use in this case...
I contacted LinqPad and they said they don't currently support Windows Live Authentication. I'm guessing that one would have to write a plugin and use the logic from this page to handle the authentication issues.

Resources