Getting Only https scheme with a valid host are supported when calling sites.with_url().get()
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Commencez par reproduire le problème signalé avec get_site(), en particulier client.sites.with_url('/sites/example').get(), et suivez la manière dont cette URL relative est transmise via le client Graph et le flux d’authentification. Comparez les formes d’URL acceptées et ajoutez ou mettez à jour la couverture afin qu’une requête valide de site SharePoint renvoie un objet site ou produise une erreur appropriée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Reporting an Issue or Missing Feature
When attempting to get a SharePoint site a Kiota authentication error is thrown.
Expected behavior
A site object should be returned.
Actual behavior
The following error is thrown:
kiota_authentication_azure._exceptions.HTTPError: Only https scheme with a valid host are supported
Steps to reproduce behavior
import asyncio
from azure.identity.aio import ClientSecretCredential
from kiota_abstractions.api_error import APIError
from msgraph import GraphServiceClient
#############################################################################################################
#Declare Variables
#############################################################################################################
client_id = ""
client_secret = ""
scopes = ['https://graph.microsoft.com/.default']
tenant_id = ""
#############################################################################################################
#Build Microsoft Graph Client
#############################################################################################################
credentials = ClientSecretCredential(
client_id = client_id,
client_secret = client_secret,
tenant_id = tenant_id,
)
client = GraphServiceClient(
credentials = credentials,
scopes = scopes,
)
#############################################################################################################
#Get SharePoint Site
#############################################################################################################
async def get_site():
try:
site = await client.sites.with_url('/sites/example').get()
if site:
print(site)
except APIError as api_error:
print(f'Error: {api_error.error.message}')
asyncio.run(get_site())
Versions
Python 3.10.11
Package Version
------------------------------------ ---------
aiohttp 3.8.5
aiosignal 1.3.1
anyio 4.0.0
async-timeout 4.0.3
attrs 23.1.0
azure-core 1.29.4
azure-identity 1.14.0
certifi 2023.7.22
cffi 1.15.1
charset-normalizer 3.2.0
cryptography 41.0.4
Deprecated 1.2.14
exceptiongroup 1.1.3
frozenlist 1.4.0
h11 0.14.0
h2 4.1.0
hpack 4.0.0
httpcore 0.18.0
httpx 0.25.0
hyperframe 6.0.1
idna 3.4
importlib-metadata 6.8.0
microsoft-kiota-abstractions 0.8.6
microsoft-kiota-authentication-azure 0.3.0
microsoft-kiota-http 0.6.1
microsoft-kiota-serialization-json 0.4.0
microsoft-kiota-serialization-text 0.2.1
msal 1.24.0
msal-extensions 1.0.0
msgraph-core 1.0.0a4
msgraph-sdk 1.0.0a16
multidict 6.0.4
opentelemetry-api 1.20.0
opentelemetry-sdk 1.20.0
opentelemetry-semantic-conventions 0.41b0
pip 23.2.1
portalocker 2.8.2
pycparser 2.21
PyJWT 2.8.0
python-dateutil 2.8.2
pywin32 306
requests 2.31.0
setuptools 65.5.0
six 1.16.0
sniffio 1.3.0
std-uritemplate 0.0.42
typing_extensions 4.8.0
urllib3 2.0.5
wrapt 1.15.0
yarl 1.9.2
zipp 3.17.0
Operating system/environment?
- Windows
- Linux
- MacOS
- Azure Cloud Shell
- Azure Functions
- Other : please specify
- Langage dominant
- Python
- Étoiles
- 630
- Forks
- 96
- Merge moyen
- 15 h 20 min
- PR mergées (30 j)
- 3
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoftgraph/msgraph-sdk-python
-
status:waiting-for-triage type:bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
microsoftgraph/msgraph-sdk-python#1570 ·
-
status:waiting-for-triage type:bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
microsoftgraph/msgraph-sdk-python#1563 ·
-
Needs: Attention :wave: type:bug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
microsoftgraph/msgraph-sdk-python#1287 · 2 commentaires · 1 réaction ·
-
Batch Request Support Ouvertestatus:waiting-for-triage
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
microsoftgraph/msgraph-sdk-python#1557 ·
-
status:waiting-for-triage type:bug
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
microsoftgraph/msgraph-sdk-python#1556 · 1 commentaire · 1 réaction ·
Toutes les issues de microsoftgraph/msgraph-sdk-python
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
zostera/django-bootstrap4#894 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
use-agent-os/agent-os#3276 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
NousResearch/hermes-agent#117848 ·