<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>5 Apr 2019 16:07:48 Z</lastBuildDate><pubDate>31 Jan 2018 17:51:29 Z</pubDate><description>Bonjour,&#13;
&#13;
J'essaye de faire un programme windev qui me permet d'aller chercher des attachements d'une listitem sharepoint, &#13;
&#13;
J'ai eu un problème avec la connexion, voila mon code:&#13;
&#13;
OAuth2Params est un OAuth2Paramètres&#13;
Montoken est un AuthToken&#13;
OAuth2Params..ClientID = "XXXXXXXXXXXXXXXXXXXXXXXX"&#13;
OAuth2Params..ClientSecret = "XXXXXXXXXXXXXXXXXXXXXXXXXX"&#13;
OAuth2Params..URLAuth = "https://login.microsoftonline.com/tenant/oauth2/authorize"&#13;
OAuth2Params..URLToken = "https://login.microsoftonline.com/tenant/oauth2/token"&#13;
OAuth2Params..URLRedirection = "http://localhost:XXXX/" &#13;
OAuth2Params..Scope = "Web.Write" &#13;
Montoken = AuthIdentifie(OAuth2Params)&#13;
&#13;
SI Montoken &lt;&gt; Null ALORS&#13;
SI ErreurDétectée ALORS&#13;
		Erreur(ErreurInfo())&#13;
	SINON&#13;
		cMyRequest is httpRequest&#13;
		cMyRequest..Méthode = httpGet&#13;
		//cMyRequest..url = "https://XXXX.sharepoint.com/sites/Mysite/_api/lists/getByTitle('Test')/items('2')?$select=AttachmentFiles,Title&amp;$expand=Attachments"&#13;
		cMyRequest..ContentType = "application/json"&#13;
		cMyRequest..AuthToken =  Montoken&#13;
		cMyResponse is httpResponse = HTTPEnvoie(cMyRequest)&#13;
		&#13;
		IF ErrorOccurred THEN&#13;
			Error(ErrorInfo(errFullDetails))&#13;
		ELSE&#13;
			&#13;
			Trace(cMyResponse..Contenu)&#13;
					&#13;
		FIN&#13;
END&#13;
&#13;
FIN&#13;
&#13;
voici la réponse renvoyer:&#13;
&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"&gt;&lt;m:code&gt;-2147024891, &#13;
System.UnauthorizedAccessException&lt;/m:code&gt;&#13;
&lt;m:message xml:lang="en-US"&gt;Access denied. You do not have permission to perform this action or access this resource.&lt;/m:message&gt;&lt;/m:error&gt;&#13;
&#13;
Pourriez vous m'aider???</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api/read.awp</link><title>connect to the Sharepoint REST API</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>Oliv67</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-229199/read.awp</comments><pubDate>5 Apr 2019 16:07:48 Z</pubDate><description>Merci Reppa&#13;
Voici comment j'ai configuré ma connexion &#13;
mais à priori mon scope n'est pas bon &#13;
il faut mettre l'url du site sh…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-229199/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-229199/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api/read.awp">connect to the Sharepoint REST API</source><title>Re: connect to the Sharepoint REST API</title></item><item><author>Poncherello</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-229196/read.awp</comments><pubDate>5 Apr 2019 15:14:22 Z</pubDate><description>Au vu du message, il faut vérifier la configuration sur sharepoint de l'accès par oAuth2 et vérifier que le scope Web.Write est …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-229196/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-229196/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api/read.awp">connect to the Sharepoint REST API</source><title>Re: connect to the Sharepoint REST API</title></item><item><author>Oliv67</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-229193/read.awp</comments><pubDate>5 Apr 2019 13:10:01 Z</pubDate><description>Bonjour &#13;
j'ai le même problème ... vous avez trouvé la solution ? &#13;
Merci</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-229193/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-229193/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api/read.awp">connect to the Sharepoint REST API</source><title>Re: connect to the Sharepoint REST API</title></item><item><author>c.barbet-massin</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-220840/read.awp</comments><pubDate>3 Oct 2018 17:17:18 Z</pubDate><description>Avez-vous trouvé une solution?&#13;
Merci.</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-220840/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api-220840/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/214181-connect-sharepoint-rest-api/read.awp">connect to the Sharepoint REST API</source><title>Re: connect to the Sharepoint REST API</title></item></channel></rss>
