Hi Team,
I'm currently working on integrating Azure Entra (AAD) with Posit Connect using OpenID Connect. Below is the initial configuration I've set up:
[Authentication]
Provider = "oauth2"
[OAuth2]
ClientId = "<>"
ClientSecret = "<>"
OpenIDConnectIssuer = "https://login.microsoftonline.com/<>/v2.0"
RegisterOnFirstLogin = true
UniqueIdClaim ="sub"
EmailClaim =""
FirstNameClaim =""
LastNameClaim = ""
GroupsClaim=""
Logging = true
[Authorization]
UserRoleGroupMapping = false
ViewerRoleMapping ="psl-connect-de-dev-group"
PublisherRoleMapping = "psl-connect-viz-dev-group"
AdministratorRoleMapping = "psl-connect-admin-group"
However, I'm encountering the following continuous error:
[OAuth2 handling error trying to obtain access token: oauth2: cannot fetch token: 400 Bad Request\nResponse: {"error":"invalid_grant","error_description":"AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token."]
Interestingly, I've successfully generated tokens using PowerShell and the Windows command line. It seems to be an issue with the Posit Connect setup. I've reached out to Posit Support, but haven't had any luck so far. This is currently impacting our production deployment, so urgent assistance would be greatly appreciated.