Skip to content

Commit 8c216bf

Browse files
author
Max Wang
committed
update to align the org url input as other quickstarts
1 parent 2ec1de2 commit 8c216bf

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

examples/quickstart_custom_api.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@
1313
from azure.identity import InteractiveBrowserCredential
1414

1515
# ---------------- Configuration ----------------
16-
base_url = "https://aurorabapenv0f528.crm10.dynamics.com" # <-- change to your environment
16+
if not sys.stdin.isatty():
17+
print("Interactive input required for org URL. Run this script in a TTY.")
18+
sys.exit(1)
19+
entered = input("Enter Dataverse org URL (e.g. https://yourorg.crm.dynamics.com): ").strip()
20+
if not entered:
21+
print("No URL entered; exiting.")
22+
sys.exit(1)
23+
base_url = entered.rstrip('/')
24+
client = DataverseClient(base_url=base_url, credential=InteractiveBrowserCredential())
25+
1726
CUSTOM_API_UNIQUE_NAME = "new_EchoMessage" # Must be globally unique in the org
1827
REQUEST_PARAM_UNIQUE = "new_EchoMessage_Message"
1928
RESPONSE_PROP_UNIQUE = "new_EchoMessage_Response"

0 commit comments

Comments
 (0)