get_azure_token for non azure site using active directory
I am trying to use the azure auth package to get an access token for an api that requires active directory authentication. I have all the necessary details including the tenant, resource, app id and redirect uri, but I am still getting errors about the resource not being found in the client on the popup, so I cannot login. I have checked in the azure portal and the resource id is definitely in the tenant. The site is https://mdr-api.cefas.co.uk/index.html (parts are accessible without login, but I need to access the parts that are restricted)
Does get_azure_token work if you are accessing an api that is not an azure site but does use active directory? I am starting to suspect the reason I am failing is because of that, but I have not found any other R packages for getting tokens using active directory login.