I am trying o debug my team's app locally as I have done since starting development by clicking the debug(Chrome) in the team's toolkit extension. Starting today I have been getting the following error:
[RegisterBot.AlreadyCreatedBotNotExist]: Could not get bot with id 65e9a59e-3b1b-4605-97bd-9a8000243bc0 which was created before. This could happen if the bot was created by another account. Visit https://aka.ms/teamsfx-switch-account-or-subscription-help to learn more.
I have not been logged into any other account so I'm unsure how this has happened. Has this been an issue for anyone else?
The live-site issue was resolved. #koiram Can you try again to check if the issue is gone? Thanks
There's some live-site issue of the underlying server side APIs.
You can try the workaround below. For more details, check https://github.com/OfficeDev/TeamsFx/issues/7184.
Hi all, here is a workaround for VS Code:
In .vscode/tasks.json, remove "Set up bot" from the "dependsOn" field of "Start Teams App Locally" task.
From command palette, run "Tasks: Run Task" and select "Start local tunnel". Then open "Start local tunnel" terminal, you can see the
forwarding url like
"https://f633-2404-f801-9000-18-6fec-00-26d.ngrok.io".
Create an AAD app with your M365 account. Create a client secret and copy the secret value which will be used later.
Create a bot in https://dev.botframework.com/bots/new with your M365 account. Set the messaging endpoint using the above forwarding
url like
"https://f633-2404-f801-9000-18-6fec-00-26d.ngrok.io/api/messages".
After the bot is created, configure Microsoft Teams channel.
In templates/appPackage/manifest.template.json, update botId to the AAD app client id; update validDomains to the domain of the
above forwarding url like
"f633-2404-f801-9000-18-6fec-00-26d.ngrok.io".
In bot/.env.teamsfx.local, update "BOT_ID" to the AAD app client id; update BOT_PASSWORD to the AAD app client secret.
F5.
Related
I am new to creating a discord bot. I hope you can all give me a good solution to my problem.
I tried to create a bot for a company's server and followed a free guide. I had one problem when adding the bot to the server.
I got a message that the authorization succeeded but I cannot find the bot on the server. The guide clearly mentioned that I can find an offline bot. So I created my own discord server and tried again. OMG, it went well.
What's the problem?
Should I change the discord server setting? If yes, which option?
I think that the server settings are done in the way that the bot does not have a permissions to be in the channel you are trying to find it in. If you have admin permissions take a look into User management in server settings if the bot did or did not join and if it did, give it some permissions so that it has an access to the channel you want to see it in.
(On the right panel you see member of the channel you are currently clicked onto not the entire server.)
I am trying to access the multiple communities in multiple salesforce sites with same connected-app but could not.
For example: I have created the two salesforce sites A and B. And created connected-app in A. To access rest API of A, i could authenticate with connected-app in A, But how to connect with B with using the same client_secret and client_id by differs in user_name and password?
Or is there any way to connect with REST API with username and password as creds?
Example: There is community_A1, community_A2 in Site A and community_B1 , community_B2 in Site B.
I need to access communities in both the Sites
This should work out of the box, what errors you're getting?
You can have 1 set of consumer key and secret and (if admin in target org didn't block it) you could use this to login to any SF in the world, sandbox or production, core SF or community.
Imagine being a developer of mobile app that pulls data from salesforce. You'd want to have just 1 pair of keys, not install separate key for every org people might install your app...
All org-specific stuff you need is username, password and login url. For community the login url will look like https://sandboxName-MyDomain.cs123.force.com/communityName
Once you have that, you can inspect all the OAuth2 stuff at https://sandboxName-MyDomain.cs123.force.com/communityName/.well-known/openid-configuration
Have you played with https://openidconnect.herokuapp.com/ ?
Paste your community url, for now keep the client and secret as is, click next. Login to community and keep clicking next. It should work fine and at the end - give you access_token / session id.
Now close this browser completely / open new incognito window and do it again. This time give your login url but also client and secret. Next, Next... Check the user's login history, it should mention your connected app now.
Now close this and do it last time, with the other community's login url and another user's credentials but still with your client and secret.
is there any way to connect with REST API with username and password
as creds?
Not for community. Internal users can get access in one go with https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_username_password_flow.htm&type=5 but community/experience users need this interactive login, there has to be a human consent / password typing step. And anyway it's not very secure flow. "Experience Cloud sites don’t support the OAuth 2.0 username-password flow."
In a pinch you could try the SOAP API's login method but from what I remember you may need to pass the community's Id in the message then
Connected-app is global metadata in salesforce. Once we create a connected-app in one org, then can access any salesforce site with the same client_id,client_secret, unless the admin has blocked the access.
I needed to add the custom profile into the community members to allow the access to the community via API (Community workspace -> administration -> members -> profiles.)
for technical reasons we need to change our codenameone account and all our proyects, we created the new account correctly, and on eclipse plugin we loging with the new account, (we had to reset our password in the old account).
The problem is when we try to send the build to the new account, all the builds are sending to the old account. whats the problem?
How must we change to send the builds to the new account.
Regards.
You need to open regedit and delete all of the usage of codename1 and codenameone you can find. On the web you need to delete all cookies and storage related to the domain auth.codenameone.com. This should let you relogin properly.
While trying to use the query editor in developer console.
"SELECT ID FROM ACCOUNT"
It throws an erorr saying "This session is not valid for use with the REST API".
Any idea what excatly tthe issue here. Earlier it workerd fine.
The same problem when i click on "Open" dialog of developer console and select objects.
"CANNOT LOAD OBjects.This session is not valid for use with the REST API"
I ran into this same issue, where I could open Visualforce pages, Apex, etc but it would give me the error "This session is not valid for use with the REST API" any time I tried to use the Query Editor or create a new Trigger (which needs the object list) via the Developer Console. I tried every browser, flushing cookies, logging in as other users, etc with the same results.
I found that our org has API white listing enabled (https://help.salesforce.com/HTViewHelpDoc?id=security_control_client_access.htm&language=en_US) which blocks the API calls access unless explicitly granted.
From the Salesforce Documentation
"Contact Salesforce to enable API Client Whitelisting. After it’s enabled, all client access is restricted until explicitly allowed by the administrator. This restriction might block access to applications that your users are already using. Before you enable this feature, you should configure and approve connected apps for any client applications you want users to continue using, or give the users a profile or permission set with “Use Any API Client” enabled."
So adding the "Use Any API Client" permission set to your user profile should fix the issue.
To do this via a Permission Set, you can go to Setup > Users > Permission Sets and create a new one. Add a System Permission of 'Use Any API Client'.
There may be a way to enable API access for the Developer Console via whitelisting or the app settings but I was not able to easily find a way. You would definitely want to test whatever functionality you are creating with a user that does not have that permission enabled.
This is happening because of connected app is not configured correctly.
On 'API (Enable OAuth Settings)' panel, move 'Access and manage your data (api)' option from left to right of Selected OAuth Scopes field and then save the setting.
Wait for few minute and then try. It should work.
Looks like just the session is expired. Did you try to close developer console, relogin to your SF sandbox and open developer console again?
Create a Permission Set, and add a System Permission of 'Use Any API Client'.
And associate this permission set to users. It will solve the problem.
I've created several GAE applications but failed to retrieve "Service Account Name" - there is no gserviceaccount mail on a 'Application Settings' page. My goal is to add service accounts of those applications to a list of members of the main application with edit permissions.I've tried to add account to a list of members of main project just by following pattern <appId>#appspot.gserviceaccount.com but it failed with following error "The email account you invited is not a valid Google account".My second idea was to create service account member on non-main project first following same pattern it didn't lead to an error but it has a following status "Invitation sent. Waiting for response".Have no idea how to fix it. I would greatly appreciate any help.Just for your notice: main application has billing enabled and has generated service account. Non-main applications have default version deployed and marked as "running".
Services account are always created by default when you create a new project in the Google Cloud Platform.
So there's no need for you to add them or re-create them in your project.
You may find them in the Permissions page under the main project section in the Developers' Console.
Or by using the URL https://console.developers.google.com/project/YOUR_PROJECT_NAME/permissions and using your real project name.
Older apps/projects didn't create service accounts.
Add the service account by
Going to https://console.developers.google.com/project/YOUR_PROJECT_NAME/permissions
Press Add Member
Add this email YOUR_PROJECT_NAME#appspot.gserviceaccount.com