Getting Only https scheme with a valid host are supported when calling sites.with_url().get()
まだ誰も着手していません。
評価
調査の方向性
報告された get_site() の再現から始め、特に client.sites.with_url('/sites/example').get() を確認し、その相対 URL が Graph クライアントと認証フローを通じてどのように渡されるかを追跡します。受け入れられる URL 形式を比較し、有効な SharePoint サイトのリクエストが site オブジェクトを返すか、適切なエラーを生成するように、カバレッジを追加または更新します。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 630
- フォーク
- 96
- 平均マージ
- 15時間 20分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-python のほかの issue
-
status:waiting-for-triage type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
microsoftgraph/msgraph-sdk-python#1570 ·
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoftgraph/msgraph-sdk-python#1563 ·
-
Needs: Attention :wave: type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microsoftgraph/msgraph-sdk-python#1287 · コメント 2 件 · リアクション 1 件 ·
-
status:waiting-for-triage
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
microsoftgraph/msgraph-sdk-python#1557 ·
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
microsoftgraph/msgraph-sdk-python#1556 · コメント 1 件 · リアクション 1 件 ·
microsoftgraph/msgraph-sdk-python の issue をすべて見る
似ている issue
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100