How to Integrate Sharepoint on-prem site with jira Data centre using Script Runner plugin

Suchitha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2024

How to Integrate Sharepoint on-prem site with jira Data centre using Script Runner plugin. I would also like to know whether any particular plugin is required or is it possible by script runner with the help of groovy script.

2 answers

0 votes
Nitinraj September 12, 2024

I have created a script to read and write data from Sharepoint. Basically you need to use API calls. All API information is available online, like which API call to use for which purpose based on your requirements. 

Below are basic details that are required to achieve this:

  1. Client id from SharePoint
  2. Client secrete id from SharePoint
  3. Tenant Id from SharePoint
  4. Access Token

 

How to get the above requirements?

 

  1. In your SharePoint Online tenant, go to the appregnew.aspx page.

    Example: https://example.sharepoint.com/_layouts/15/appregnew.aspx

  2. Next to Client ID and Client Secret, click Generate to generate their values.
  3. Store the client ID and client secret securely as these credentials can be used to read or update data in your SharePoint Online environment. You also need the client ID and secret to configure the SharePoint Online connection in Google Workspace Migrate.
  4. Under Title, specify a title.

    Example: Google Workspace Migrate

  5. Under App Domain, specify www.localhost.com.
  6. Under Redirect URI, specify https://www.localhost.com.
  7. Click Create.
  8. On the tenant administration site, go to the appinv.aspx page.

    Example: https://example-admin.sharepoint.com/_layouts/15/appinv.aspx

    Note: The URL must include -admin to access the tenant administration site. If you omit it, SharePoint shows a similar page, but you will not be able to grant tenant-scoped permissions.

  9. In the App Id field, enter your client ID and click Lookup to find your app.
  10. In the app’s Permission Request XML field, copy the XML below:

    <AppPermissionRequests AllowAppOnlyPolicy="true">
    <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />
    </AppPermissionRequests>

  11. Click Create.
  12. Click Trust It to confirm and grant the permissions.

Here are some useful links to generate the client IDs:

Reference Document:

YouTube Link  

 

By Following the above steps we get :

  1. Client id from SharePoint
  2. Client secrete id from SharePoint
  3. Tenant Id from SharePoint

So using the above information we need to Generate the Access Token, which is required for the authentication to connect to SharePoint using rest.

 

Ho to Generate Access Token?

Document Link



 

You can use any tool to test these like Postman.

 

Once you generate the Access, you can use the access token in the code.

 

 

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 3, 2024

@Suchitha Welcome to the Atlassian community

Technically you could do this through the Atlassian and SharePoint APIs.  Depending on what you are trying to do it might be worth it.  If you are trying to sync documents, embed SharePoint, etc.  I would suggest using an app from marketplace and saving yourself the development time and maintenance it would require if you built it yourself.  https://marketplace.atlassian.com/search?query=sharepoint&product=confluence&hosting=dataCenter 

Suggest an answer

Log in or Sign up to answer