Comments (9)
Microsoft Graph is its own product covering M365 (not only O365).
I lean towards the config screen (2nd screenshot you shared). @vikasbansal2022 what do you prefer?
from abap-sdk-for-azure.
Hi @PaddyCube,
the samples for Azure Blob can be found here. See the sdk for O365 service class to see some details about the SharePoint integration v1.
Regarding Microsoft Teams and SharePoint online integration I would recommend Microsoft Graph. That can be found here too. Design your Graph query using the explorer on the public sandbox or signin to your environment for a quicker implementation.
@vikasbansal2022 any samples that could be shared from our end?
from abap-sdk-for-azure.
Basically I need to upload to SharePoint site collection hosted in O365. Can i use this SDK for doing this? We created a ClientID in Admin center, added this ID to an AAD group and granted permissions to this group in our SharePoint Site Collection.
I use this small program to collect all files of a given document library. I'm able to get an AAD token but it always returns 401 when it tries to fetch data from SharePoint. We checked permissions of Client ID a couple of times and they're sufficient.
However, I'm confused about ClientID and SharePoint, V1, V2, ACL and this stuff. So can we use this SDK together with O365 only when we use outdated ACL instead of AAD accounts?
Do we need to switch to Graph these days (whatever this is)?
REPORT z_o365_test.
DATA: o365_sharepoint TYPE REF TO zcl_o365_service_sharepoint.
TRY.
DATA(o365) = NEW zcl_o365_service_factory( ).
o365_sharepoinT ?= o365->create( iv_interface_id = 'AZURE_O365' ).
o365_sharepoint->read_all_file_from_folder(
EXPORTING
iv_folder_name = 'Shared%20Documents'
IMPORTING
ev_http_status = DATA(http_status)
).
CATCH zcx_adf_service.
ENDTRY.
IF http_status > 299.
WRITE 'Fehler'.
ENDIF.
from abap-sdk-for-azure.
I recommend to reduce the problem space in your integration test by using a plain REST client first. Once you have a working request put the ABAP SDK to work for it. The simplest check is the Graph Explorer. See the endpoints here
from abap-sdk-for-azure.
Thanks for highlightning Graph. As SAP Developer, I'm not that familiar with all these MS products.
I had lots of issue to get it running with this SDK. For example, I had to use https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token, which seems not to be supported by this SDK. I tried with V1.0 tokens but they're not valid in Graph because the resource "resource": "00000002-0000-0000-c000-000000000000"
of token is not valid for Graph
To fix this, I had to change method get_aad_token_clnt_cred
of class zcl_adf_service_aad
. I added an optional parameter iv_scope
for scope as resource is not valid for V2.0 tokens. It only gets added to payload if filled.
Next, I enriched the class zcl_adf_service_graph
and the interface by adding methods to read a SharePoint Site, all Lists of a site and all items of a list.
If you're interrested in my changes, I'll fork this repo and create a PR
from abap-sdk-for-azure.
Hey @PaddyCube,
a PR would be fantastic!
KR
Martin
from abap-sdk-for-azure.
Before creating a PR, I would like to discuss with you, where to store ClientID. In your example, you put it in description of RFC destination. It works but it is odd in my opinion. Description should not contain any data, it should just describe what the connection is good for.
In ZADF_CONFIG, you provide a configuration section for O365 applications. Here we can store ClientID. However you just provide a list of available applications. GRAPH is missing here. Is this the right place for you, should I add it here? Is Graph part of O365 or is it a separate product?
Other option I see is here. May we store CLientID either as Key/AAD or as Base URI (Base URI seems to be wrong imo)
What would you prefer?
from abap-sdk-for-azure.
Hi @PaddyCube ,
Key/AAD Column is used to store Secret/Key. Once you save that it gets encrypted and stored in table ZADF_CON_INDX.
Since Client ID is no secret, you can use usual SAP process to store in TVARV via SM30 against some variable and use that in your program code.
Hope it helps.
Regards,
Vikas
from abap-sdk-for-azure.
Thanks for your input.
I understand that ClientID in this case can't be stored in ZADF_CONFIG for given reasons.
Patrick
from abap-sdk-for-azure.
Related Issues (20)
- BatchEvent to EventHub HOT 1
- This repo is missing important files HOT 1
- Error updating where-used list for CLAS ZCX_ADF_SERVICE_GRAPH HOT 9
- Cosmos fix from PR #93 overridden HOT 3
- Dose ABAP SDK support upload Excel xls file to Blob? HOT 24
- [FEATURE] Alternative deployment option for the SDK without 3rd party dependency HOT 4
- Interface GRAPH not maintained in factory method HOT 2
- Generation ZREST_SCREEN terminated (see long text). Return code ZREST_SCREEN
- Event-Grid - Double json serialization by oref_eventgrid->set_eventgrid_schema HOT 3
- Http version unsupport error when transfer excel from sap to azure blob HOT 3
- How to avoid the problem of duplicate names of some tables caused by importing the Azure SDK. HOT 12
- Link Microsoft AI SDK for SAP HOT 3
- The HTTP version specified is not supported for this operation by the server HOT 2
- Error activating objects HOT 5
- consider renaming AUTH GROUP and AUTH ZGROUP
- Add Possibility to list all blobs in a container HOT 5
- Update repository content to current abapGit format HOT 1
- Import of object ZADF_CONFIGFG failed HOT 9
- Rename default branch to main
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abap-sdk-for-azure.