sharepy icon indicating copy to clipboard operation
sharepy copied to clipboard

Authenticating through sharepy using client ID and Secret

Open surajram1 opened this issue 4 years ago • 2 comments

Is it possible to authenticate through Sharepy using Client ID and secret(of sharepoint teams site) as can be done in Office365-REST-Python-Client. This would be huge as I don't want to have my username and password credentials in code that needs to be used by several others and having the input prompt is not viable in an automated environment

surajram1 avatar Jun 16 '20 14:06 surajram1

That's a good question. Do you know what mechanism is used to authenticate with a client ID and secret? SharePy version 2 will support different auth classes, and this would be a good candidate for using that, if the authentication process is documented.

JonathanHolvey avatar Jun 17 '20 03:06 JonathanHolvey

This code seems to run the show in the Office365-REST-Python-Client for this kind of authentication: https://github.com/vgrem/Office365-REST-Python-Client/blob/0676002838d51edf027d3c983a4bdb71e6b1a381/office365/runtime/auth/providers/acs_token_provider.py#L8

jamesjnadeau avatar Sep 25 '20 18:09 jamesjnadeau