1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SSOのまとめ

1
Last updated at Posted at 2022-02-21

まとめページに戻る
まとめN~Z


権限セットを使って、特定のユーザだけにSSOを強制することはできると思いますが、ユーザ自身でどちらかを選択できる機能はないと思います。(システム管理者が選択して、設定は可能です)

特定のユーザーの SSO を要求するには、「シングルサインオンの有効化」ユーザー権限を割り当てます。

https://help.salesforce.com/s/articleView?id=xcloud.sso_enforce_sso_login.htm&type=5

弊社でもAzure AD(現Microsoft Entra ID)をIDプロバイダー(IdP)としてログインする設定を行っています。以下の場所で設定は可能です。

特権ユーザーはこの設定と別途フィッシング耐性MFAを設定しています。私の場合はGoogle パスワード マネージャーによる設定を行いました。(念のため追加の設定をしました。管理者でもSSOだけで大丈夫なのかはチャレンジしてません)

image.png


use OAuth:

using SAML :

トレイルヘッド

My username was incorrect. Fixing it resolved the login issue.

日本語だけのヘルプ

早速ですが、PCのシングルサインオンは実現できていますが、それをSalesforceモバイルアプリケーションを利用すると、classic画面に飛ばされてしまいます。

特段の設定が必要といったわけではなくPCができていれば、モバイルでデフォルトの"本番"ではなく私のドメインURLで認証すませればログインできる形でした。

  • Lightning Experience doesn’t support incognito or other private browsing modes.

https://help.salesforce.com/s/articleView?id=release-notes.getstart_browsers_sfx.htm&release=238&type=5

運用面

私の組織はポリシーにより 100% SSO になっていますが、同様のことが起こりました。時折、自分のアカウントまたは別のユーザーのアカウントのユーザー/パス設定を確認する必要があります。

組織で SSO 権限を割り当てるために権限セットを使用しています。パスワードをリセットする必要があるアカウントのその権限セットを一時的に削除し、パスワードのリセット プロセスを実行します。その後、ユーザー/パスが必要なものにログインし、SSO 権限セットをオンに戻します。

これはユーザーにパスワードを設定するための一時的な方法にすぎないかもしれませんが、私にとってはうまくいきました。

資料

image.png

認証には Azure SSO も使用します。新規ユーザーの場合は認証は必要ありません。サンドボックスは通常、設定 / 電子メール / 到達性が「アクセスなし」に設定されています。これが真の場合、サンドボックスから電子メールは送信されません。

OAuthエラーのため、あなたを認証できません。詳細は、Salesforceシステム管理者に

お問い合わせください。

OAUTH_APPROVAL_ERROR_GENERIC:認証中、予期せぬエラーが発生しました。

もう一度お試しください。

同じようなエラーが既知の問題に上がっているようです。

Salesforce App users cannot login see error - OAUTH_APPROVAL_ERROR_GENERIC
https://issues.salesforce.com/issue/a028c00000gAz9lAAC/salesforce-app-users-cannot-login-see-error--oauth_approval_error_generic

この問題は私の設定に対する認識不足から起こったものと確認できましたので報告します。

ソーシャルIDプロバイダーを使ったSSOを 同じデバイスで 組織の複数のユーザにログインして設定を試みましたが 組織管理者が個々のユーザーのソーシャルIDを指定することはできないようです。よって2番目の登録ユーザーでは当初質問のエラーとなり該当メッセージが表示されると確認しました。

よって代表するユーザーを作成してそのSSOを設定し複数の組織ユーザーで運用する(その目論見でしたが質問者のアカウント以外に運用ユーザをSSO設定する作業をしてしまった)場合本件の問題をクリアーしておく必要があるようです。

  1. Checking that the timestamps in the assertion are valid

Current time is after notOnOrAfter in Conditions

Current time is: 2021-06-09T21:33:08.118Z

Time limit in Conditions, adjusted for skew, is: 2021-06-09T19:47:18.556Z

Timestamp of the response is outside of allowed time window

Current time is: 2021-06-09T21:33:08.118Z

Timestamp is: 2021-06-09T19:39:18.556Z Allowed skew in milliseconds is 480000

Timestamp of the assertion is outside of allowed time window

Current time is: 2021-06-09T21:33:08.118Z

Timestamp is: 2021-06-09T19:39:18.556Z

Allowed skew in milliseconds is 480000

I had this issue today. We use Federation ID on the User record for SSO.

Our Resolution: Copy/paste Fed ID value (email address in our case) into Notepad --> Copy/Paste back into Fed ID field. This removes any special characters that may not be visible.

以下のような説明がありますね。

設定エラー/無効な権限
Salesforce の SAML 設定に問題があります。たとえば、アップロードした証明書が破損しているか、組織の [シングルサインオン設定] で SAML が無効になっています。

https://help.salesforce.com/s/articleView?id=xcloud.sso_saml_validation_errors.htm&type=5

You account has been disabled.Your company administrator has disabled access to the system for you. Please contact your administrator for more information.

Just to close the loop on this, it turned out the user with the problem had another user record in our SFDC that was inactive but the name was different on the record. The user later changed the name they go by and it was updated in active directory. The user never needed Salesforce access until recently and the old record was still connected with their active directory record. I simply had to revoke the SSO connection under Third Party Account Links on this inactive user record to resolve the issue.

設定

Could you please double check single sign-on settings in your salesforce org if it is configured to use Federation ID as SAML identity type or username. If federation Identity type is configured to use username as identity type, it will use username even though you have entered Federation ID on user record.

Salesforce 組織のシングルサインオン設定が SAML ID タイプまたはユーザ名としてフェデレーション ID を使用するように設定されているかどうかを再確認してください。フェデレーション ID タイプが ID タイプとしてユーザー名を使用するように構成されている場合、ユーザー レコードにフェデレーション ID を入力したとしても、ユーザー名が使用されます。

以下の説明が役に立つと思います。

Salesforce で多要素認証が必須に - Azure AD 側での対応
https://jpazureid.github.io/blog/azure-active-directory/salesforce-now-enforcing-multi-factor-authentication-azure-ad/

メール検証済

弊社ではSAMLのJITプロビジョニングを利用してユーザーアカウント作成しており、
作成時にメールアドレスに届いたリンクをクリックするような運用が発生しておらず。作成されたユーザーはほぼ未検証の状態でございます。
どうやって、メールを検証済にするか

アイデアには上がっているのですが、賛同者は少ないみたいですね。

Need a way to verify a User Email address for SSO only users
https://ideas.salesforce.com/s/idea/a0B8W00000Gdmf5UAB/need-a-way-to-verify-a-user-email-address-for-sso-only-users

ずっと使える方法ではないかもしれませんが、、非同期メール API メソッドという方法があるようです。

ユーザーのメール検証を開始する方法はいくつかあります。いずれの場合でも、ユーザーは未検証のメールアドレス宛に検証リンクを受信します。検証リンクは 72 時間後に期限切れになります。ユーザーが期間内にリンクをクリックしなかった場合、新しいリンクを送信できます。

  • 1 人のユーザーの検証を開始するには、[ユーザー] 設定ページでユーザーを選択します。ユーザーのメールアドレスの横で、[検証] をクリックします。
  • 複数のユーザーの検証を同時に開始するには、非同期メール API メソッド (リリースプレビューの時点で内容が更新されることや、項目が参照不可になることがあります) を使用します。
  • ユーザーはメールアドレスの横にある [検証] をクリックすることで、[高度なユーザーの詳細] ページから自分で検証を開始できます。

または、ユーザーがパスワードをリセットすると、そのプロセス中にメールアドレスが自動的に検証されます。ユーザーはメールで送信されたパスワードリセットリンクをクリックすることで、メールアドレスの所有権を確認します。

https://help.salesforce.com/s/articleView?id=release-notes.rn_security_email_verification.htm&release=246&type=5

Unable to find Subject

Sandoboxでの運用

サンドボックスを作成または更新するときに、ユーザーに SSO の使用を強制して私のドメインからログイン ポリシーをコピーしないオプションがあれば便利です。現在、サンドボックスを作成するたびに、バックドア URL を使用してログインし、[私のドメイン] でこの設定を無効にする必要があります。本番環境では SSO を使用しますが、サンドボックスでは使用しません。そのため、ユーザーがネイティブの Salesforce ログイン ページからログインできないようにしたくありません。

エラー

image.png

既知の問題に紹介されている解決方法では納得しないらしい。

Workaround

Once the user is presented with the error, please have them select "Use a Different Verification Method". They can then choose to manually enter the 6 digit code presented within the Authenticator app for the username they are attempting to login with.

https://trailblazer.salesforce.com/issues_view?id=a1p4V0000003ykpQAA

ユーザーにエラーが表示されたら、「別の検証方法を使用する」を選択してもらいます。その後、ログインに使用するユーザー名として、Authenticator アプリ内に表示される 6 桁のコードを手動で入力することを選択できます。

If users are having issues signing in using Single Sign-On (SSO), you can troubleshoot by checking the login history. Look for whether the problem is related to a SAML assertion error or a configuration issue. If it's an assertion problem, use the SAML Assertion Validator to pinpoint the specific issues.

Collaborate with your identity provider to make sure both the SAML assertion and your SSO settings are correct and valid.

Please check out below help articles which can be helpful in troubleshooting the issue:

https://help.salesforce.com/s/articleView?language=en_US&id=sf.sso_saml_validation_errors.htm&type=5

https://help.salesforce.com/s/articleView?id=000382294&type=1
https://help.salesforce.com/s/articleView?id=000385386&type=1
https://www.salesforceben.com/how-to-troubleshoot-a-single-sign-on-error/

ユーザーがシングル サインオン (SSO) を使用してサインインする際に問題が発生した場合は、ログイン履歴を確認することでトラブルシューティングを行うことができます。問題が SAML アサーション エラーに関連しているのか、それとも構成の問題に関連しているのかを確認します。アサーションの問題の場合は、SAML アサーション バリデータを使用して特定の問題を特定します。

ID プロバイダーと協力して、SAML アサーションと SSO 設定の両方が正しく有効であることを確認してください。

問題のトラブルシューティングに役立つ以下のヘルプ記事をご確認ください。

We can’t log you in because there is an issue with single sign-on. Contact your Salesforce admin for help.

Usually, this error occurs if there is a change in the Federation ID.

We have faced a similar issue in the past and if there is a Federation ID this error cause.

Solution: Lower case, Upper case All data has to be case sensitive.
https://developer.salesforce.com/forums/?id=9062I000000g4e9QAA

Please make sure that below two Items are in place:

  1. Users That are not able to use SSO, They are added to Azure Directory for the ORG that you want to give access in.
  2. Federation ID: make sure the federation Id in User Record (Salesforce) is the same as in Azure. This is case sensitive.
    https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A8HlWSAV

can't find "Single Sign-On Settings" in Sia Thripio's user edit and can't find edit option in Single Sign-On Settings.

What I have done to is to close my org and relaunch again, then the "Edit" option reappeared for me to disable and enable the SAML.

私がやったことは、組織を閉じて再度起動すると、SAML を無効または有効にするための [編集] オプションが再び表示されました。

NO_ACCESS: Unable to find a user

NO_ACCESSのエラーの説明によると以下のようです。

正しいユーザ名を使っていますか?
ユーザーを検索できない。例: ユーザー名が存在しない。

https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_flow_errors.htm&type=5

We can't see that you were able to successfully test your Lightning Login configuration for Brochan Pane.

when login on salesforce with you user, just enter username without password and click on login.

The app will ask you to authentificate.

https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007XGdZxSAL

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?