When you use a file from SharePoint as your Power BI data source and then set up a refresh interval in the Power BI Service, as a first step you need to connect to it.
To provide your credentials go to your Semantic model and select Settings.
Under Data source credentials you can connect to your Sharepoint file.
Select OAuth2 as the authentication method and set your privacy level then click on Sign in.
If you receive an error message like this:
It is usually because you are trying to do this from Microsoft Teams or from a browser that prevents the pop-up windows.
The cause of this problem? Pop-ups are not allowed
To finish the OAuth2 authentication Power BI tries to open a new window where you can provide your SharePoint credentials but if pop-ups are not allowed then it will fail and give the 'You need to use SSL (HTTPS) when you use OAuth 2.0' message.
To fix the problem, make sure your browser allows pop-up windows from powerbi.com
Go to your browser Settings and under Privacy & Security, disable pop-up blocking or add the Power BI service URL, powerbi.com, as an exception.