@AndyHowes if you want you can skip the msal part. You just need to obtain a bearer token, for example using Requests will be something like
import requests
url = "https://login.microsoftonline.com/[TENANT-ID]/oauth2/v2.0/token"
payload = 'grant_type=client_credentials&client_id=CLIENT_ID&client_secret=CLIENT_SECRET'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
(from the response.text you can extract the bearer token, right now I don't remember the right property, should be access_token)
and after you use the bearer token in your request, for example a WhoAmI
import requests
url = "https://[yourorg].crm[number].dynamics.com/api/data/v9.2/WhoAmI()"
payload = {}
headers = {
'OData-MaxVersion': '4.0',
'OData-Version': '4.0',
'Content-Type': 'application/json; charset=utf-8',
'Accept': 'application/json',
'Authorization': 'Bearer [TOKEN HERE]'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
you can use my tool Dataverse REST Builder to create the requests and export it to Postman if you want to convert them to other languages like Python.
Thanks for your message, is always nice to see Dataverse connecting to other languages beside .NET