Describe the bug
NationalClouds is defined in
|
class NationalClouds(str, Enum): |
|
"""Enumerated list of supported sovereign clouds""" |
|
|
|
China = 'https://microsoftgraph.chinacloudapi.cn' |
|
Germany = 'https://graph.microsoft.de' |
|
Global = 'https://graph.microsoft.com' |
|
US_DoD = 'https://dod-graph.microsoft.us' |
|
US_GOV = 'https://graph.microsoft.us' |
|
|
|
def __str__(self): |
|
return self.value |
where all values are prefixed by https,
however, since we pass them as allowed hosts to the AzureIdentityAuthenticationProvider by default in
|
allowed_hosts: list[str] = [nc.value for nc in NationalClouds] |
they are fed to the AllowedHostsValidator which in https://github.com/microsoft/kiota-python/blob/b23edcbf268efdb81d14ef59cecc6c9565288248/packages/abstractions/kiota_abstractions/authentication/allowed_hosts_validator.py#L20 raises an exception if they are prefixed.
Expected behavior
The validator should either strip the urls or the enum should be updated.
How to reproduce
Instantiate an AzureIdentityAuthenticationProvider with default allowed hosts.
SDK Version
1.3.3
Latest version known to work for scenario above?
No response
Known Workarounds
Pass allowed_hosts manually.
Debug output
No response
Configuration
No response
Other information
No response
Reactions are currently unavailable
Describe the bug
NationalClouds is defined in
msgraph-sdk-python-core/src/msgraph_core/_enums.py
Lines 33 to 43 in e54022a
however, since we pass them as allowed hosts to the AzureIdentityAuthenticationProvider by default in
msgraph-sdk-python-core/src/msgraph_core/authentication/azure_identity_authentication_provider.py
Line 22 in e54022a
they are fed to the AllowedHostsValidator which in https://github.com/microsoft/kiota-python/blob/b23edcbf268efdb81d14ef59cecc6c9565288248/packages/abstractions/kiota_abstractions/authentication/allowed_hosts_validator.py#L20 raises an exception if they are prefixed.
Expected behavior
The validator should either strip the urls or the enum should be updated.
How to reproduce
Instantiate an AzureIdentityAuthenticationProvider with default allowed hosts.
SDK Version
1.3.3
Latest version known to work for scenario above?
No response
Known Workarounds
Pass allowed_hosts manually.
Debug output
No response
Configuration
No response
Other information
No response