> sfdx force:auth:web:login -a test
# このコマンド実行後、Salesforceログイン画面が表示された状態でブラウザが起動する。
# この画面でログインすることで Salesforce DX CLI 側に組織、ユーザ情報が登録される。
> sfdx force:org:list
=== Orgs
ALIAS USERNAME ORG ID CONNECTED STATUS
───── ─────────────────── ────────────────── ─────────────────────
test test@sampleorg.com 00DxxYYYYYzzzzzAAA Connected
# force:auth:web:login でログインした情報が表示される
> sfdx force:org:open -u test
WARNING: This command will expose sensitive information that allows
for subsequent activity using your current authenticated session.
Sharing this information is equivalent to logging someone in under the
current credential, resulting in unintended access and escalation of privilege.
For additional information, please review the authorization section of the
https://developer.salesforce.com/docs/atlas.en-us.234.0.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm
Access org 00DxxYYYYYzzzzzAAA as user test@sampleorg.com with the following
URL: https://mysampledomain.my.salesforce.com/secur/frontdoor.jsp?sid=00DxxYYYYYzzzzz!heersgKJolaf0kq3rLMODASA...
Waiting to resolve the Lightning Experience-enabled custom domain...... done
これはログイン IP アドレスの制限が設定されているユーザにてログイン後にIPアドレスがログイン IP アドレスの制限の範囲外になった場合、エラーとする機能です。
これも同様に、Salesforce DX CLI で発行されたIDにログイン IP アドレスの制限範囲外となる外部からアクセスしようとしてもエラーになりますが、Salesforceアクセス後に自分の端末のIPアドレスがログイン IP アドレスの制限範囲外になった場合もエラーになります。(ノートPCやスマートフォンで、VPN使用時にVPNが切断された場合などが該当するでしょう。)
「Lightning Platform Starter と Lightning Platform Plus のどちらにも Salesforce Platform ライセンスと Company Communities 権限セットライセンスが含まれます。次の表は、Salesforce Platform ライセンスが付与され、Company Communities 権限セットライセンスが割り当てられているユーザが使用できる機能を示します。」
という文言がある通り、 ケースオブジェクトにアクセスさせるには Company Communities 権限セットライセンスをユーザに付与する必要があります。
Company Communities 権限セットライセンスは、Salesforce組織上では「Company Community for Force.com」権限セットライセンスとして有効化されます。
手順
Company Communities 権限セットライセンスをユーザに付与する具体的な手順は以下になります。
設定画面でメニューから「権限セット」を選択
[新規]をクリック
表示ラベルやAPI参照名を入力し、ライセンスから「Company Community for Force.com」を選択して[保存]をクリック