0

I am trying to do a sfdx force:source:pull from a scratch org where I defined and authenticated a Named Credential and Auth Provider (OAuth2 Named Principal). I get:

• RetrieveFailed - Entity of type 'AuthProvider' named 'MyProvider' cannot be found

The only thing that I have found was this Known Issue: Metadata cannot be pulled after first authentication with Lightning for GMail without any workaround.

  • Not sure if you really want to pull the metadata, otherwise you could skip the complaining file by adding them to .forceignore – Raul Jun 11 at 13:51
  • How would I do that for this case? Add **AuthProvider or **NamedCredential there? – Robert Sösemann Jun 11 at 13:58
  • Either that or its complaining about file named A360 Keycloak, you may need to do few tries.. :) – Raul Jun 11 at 14:08
1

Make sure your AuthProvider name has no spaces.

I was able to pull the metadata using the retrieve command:

sfdx force:source:retrieve -m AuthProvider

However, your subsequent pull commands will continue to fail because it cannot find the AuthProvider.

If you rename it replacing spaces with underscores (Name and URL Suffix will both have no special chars) pull commands will work just fine.

Hope this helps.

Jose

0

I was able to selectively pull the problematic metadata using this plugin https://www.npmjs.com/package/@rohanatgwcs/sfdx-selective-retrieve-deploy

sfdx gs:source:pull --type AuthProvider --names MyProvider --targetdir force-app/main/default/authProvider

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.