SharePoint in AX7

Hi Everyone,

Could anyone please share me the document for SharePoint integration in AX7.



Can you define what integration requirement you have? Also, do you consider SharePoint Online?

Yes Martin… I need to look into SharePoint Online only. I didn’t get a clear idea about how we can configure in AX7

I still don’t know what you mean by “integration”; it can mean almost anything.

If you want to use SharePoint Online for document management, it should work without any extra setup. According to AX wiki: SharePoint storage will work immediately if you have an O365 license since we auto-discover the SharePoint tenant e.g. a user on the O365/AAD tenant gets as the SharePoint site.

Hi Martin,

As discussed I am posting the below again in this thread.

There was a requirement that we handled in AX2012. In standard the user can attach a document to a record which will be stored in SharePoint.

What we customized is , documents will be placed in SharePoint in a separate folder and AX needs to pick all those files from that folder and the information will be saved in “Unattached documents” form in AX 2012.

A batch job was designed to pick all those documents.

The customer gave access to one service account to access their SharePoint. And we will save the cookies for that account in our AX DB.

So every time when the user logins, we will delete the cookies from their internet explorer and we will pass the saved cookies.

And I am not sure how we can implement the above scenario in AX7 as there are lot of changes.

There is a login button in the DocuParameters form which will prompt user to login. And after that the WinApi command will execute to delete the internet cookies. Once logged in, I will run my customized class to import the documents from SharePoint. For that I will pass the saved cookies in DB.

Hope this makes little clear.

SharePoint Online authenticate through Azure Active Directory, which isn’t driven by any cookies. You probably refer to some legacy customization that doesn’t apply to AX 7.

Hi Martin,

We will come back to the base functionality. When I tried to test the SharePoint connection from DocuParameters form, it is giving me the below authorization error,

"You are not authorized to connect to ‘’ ".

Indeed the user is admin in SharePoint online site.

Could you please help me to trace the error? The error is coming from the below code,

System.UriBuilder builder = new System.UriBuilder(src);
str hostName = builder.Host;
str externalId = xUserInfo::getExternalId();
ISharePointProxy proxy = SharePointHelper::CreateProxy(hostName, ‘/’, externalId);
validConnection = true;
info(strfmt(’@ApplicationFoundation:SPServerCommunicationSuccess’, hostName));
info(strfmt(’@ApplicationFoundation:SPServerUserNotAuthorized’, hostName));

What is SharePointHelper class? Are you sure it can be used for SharePoint Online? The code doesn’t look like something I would expect for SharePoint Online. Isn’t it again all code from a different version of AX to connect to a different product (SharePoint instead of SharePoint Online)? If so, don’t waste time with it, it’s useless of your current scenario.
I would recommend using OfficeSharePoint class in AX 7.

No. It is not a customized object. That’s the code available in AX7 and it is out of box code to test the SharePoint connection. It is available in DocuParameters form under “Test sharePoint connection” button.

And in OfficeSharePoint class also they have used SharePointHelper proxy only.

Now I am stuck with this ExternalUserId. Not sure what should be there in the field “ExternalUserId”.

All right, so the answer to my question is that SharePointHelper class is developed by Microsoft under namespace Microsoft.Dynamics.Platform.Integration.SharePoint. Then the code above isn’t relevant, unless you think that Microsoft has a bug there.

Nevertheless it seems that your current question is about configuration and authentication, not code, therefore putting it to a developer forum and jumping into code probably wasn’t the best course of action.

If you have Office 365 licenses, right tenants etc. and therefore it should work according to Wiki, I think you should talk to Microsoft.

For reference, the discussion now seem to continue in yet another thread, SharePoint Test connection in AX7.

(Moderators don’t get bored here…)