Deployment failed - ingestEvents->runPowerShellInline
Describe the bug Using the instructions in the training guide, deployment of initial Azure Sentinel Training Lab failed on ingestEvents, in the runPowerShellInline script. Error provided is: DeploymentScriptOperationFailed "The received access token is not valid: at least one of the claims 'puid' or 'altsecid' or 'oid' should be present. If you are accessing as application please make sure service principal is properly created in the tenant."
This deployment was using a newly created Azure account using the trial free period. Deployed to East US.
To Reproduce Steps to reproduce the behavior: Follow the instructions listed here: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Training/Azure-Sentinel-Training-Lab/Modules/Module-1-Setting-up-the-environment.md Deployment failed at Exercise 2, step 4.
Expected behavior Successful deployment
Screenshots

Desktop (please complete the following information):
- OS: Ubuntu
- Browser: Firefox
- Version: 99
Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.
Hi @romandas,
I have just validated this in my environment, and it seems to work as expected.

When looking into the deployment method for data ingesting data deploymentScript resource is used. Can you share the error in which is shown in the 'Operation details' of the deployment? I have seen a GatewayTimeOut before, but that was gone when I re-deployed the solution.
Yes, the error was: DeploymentScriptOperationFailed "The received access token is not valid: at least one of the claims 'puid' or 'altsecid' or 'oid' should be present. If you are accessing as application please make sure service principal is properly created in the tenant."
It failed three times -- twice yesterday, and once this morning. Though, it just worked now, on the fourth try. Not sure why. I wonder if it is related to my just creating a new Azure account?
What a Deployment Script deployment does is temporarily create a Container Instance and StorageAccount that is used to run the deployment script in.

To run the script from the container a used assigned managed identity is also created. Another thing that sometimes happens is that the user that starts the deployment has insufficient permissions to assign a role to the user assigned managed identity causing the deployment to fail.
Does that help?
I didn't change any permissions on my account -- it's a personal one using the Azure free trial -- so I don't know if that would really be the issue in this case. So, could there be a race condition here, where the managed identity hasn't been created yet when the script runs?
Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.
@romandas have you experienced this error again? Yeah, it might be a race condition, but we have no control over that, we just use deploymentScripts resource type and that takes care of creating the different components including the managed identity and granting permissions to it
Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.
I got the same error today, reinstalled the training lab multiple times and it still fail.

I did a bit investigation, the job failed on a deployment script IngestCSV.ps1 https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Training/Azure-Sentinel-Training-Lab/Artifacts/Scripts/IngestCSV.ps1
It require two parameters and I confirmed the workspaceID and shared key are correct. I see the script will create 6 custom log tables, and the deployment script only created 5, the biggested securityEvent_CL table was not created.

I tried to manually run IngestCSV.ps1 and it works fine ( 6 tables were created ). I suspect Azure deployment script might have a resource issue to handle the bigger table and somehow it failed.
Workaround is manually run IngestCSV.ps1 with correct workspace ID and key.
I cannot reproduce that error @jackchenwork , works fine for me
Ah, been looking for this same error, on same script -- how do I run the script manually? Azure Cloud Shell?