Open danscrima opened 1 year ago
Can you try updating bicep? The latest version is 0.18.4 and there are two separate installations - one for VS code and then the bicep CLI is separate.
I'm specifically talking about the documentation... there's no examples or list of allowable values for the serviceProviderId or serviceProviderDisplayName... I'm mostly guessing and keep getting an error {"code":"InvalidBotData","message":"Mismatch between Service Provider Id and Name. "}
I'm trying to add a connection for a "Generic Oauth 2" but no idea what the values for those two fields are supposed to be in bicep
I ended up using the chrome inspector to look at the dropdown list of connection types to find the ID, which no one would ever know ha. I think there needs to be some sort of enum added for the types of connections to use with Bicep...
As @danscrima mentioned, you can open the dev tools (f12) and look at the network tab when you click 'Add OAuth Connection Strings' and it will show all of the providers and their Ids. Here is an example of the bicep template as well.
resource botServiceOauthConnection 'Microsoft.BotService/botServices/connections@2022-09-15' = {
name: connectionName
parent: botService
location: 'global'
properties: {
serviceProviderDisplayName: 'Azure Active Directory v2'
serviceProviderId: '30dd229c-58e3-4a48-bdfd-91ec48eb906c'
clientId: aadAppClientId
clientSecret: aadAppClientSecret
scopes: 'User.Read'
parameters: [
{
key: 'tenantId'
value: aadAppTenantId
}
{
key: 'tokenExchangeUrl'
value: '<your token exchange URL>'
}
]
}
}
Bicep version 0.11.1
Describe the bug Trying to add a Generic OAuth 2 connection via Bicep but there's nothing to show what the value should be for the serviceProviderId.
To Reproduce There's no example of the properties for each connection similar to how there are examples for the Channels. https://learn.microsoft.com/en-us/azure/templates/microsoft.botservice/2022-09-15/botservices/connections?pivots=deployment-language-bicep#connectionsettingparameter