Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not connect to SharePoint Online #50

Closed
actionitservices opened this issue Jan 31, 2023 · 2 comments · Fixed by #51
Closed

Could not connect to SharePoint Online #50

actionitservices opened this issue Jan 31, 2023 · 2 comments · Fixed by #51
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@actionitservices
Copy link

Describe the bug
The SharePoint Connect command is failing due to error in the URL string.
Error:
Connect-SPOService : Could not connect to SharePoint Online.
Connect-SPOService -Url "https://$org_name-admin.sharepoint

$org_name is also incorrect as it contains .onmicrosoft.com.
SharePoint URL should be like: https://contoso-admin.sharepoint.com

My nasty fix using sub string
$length = $org_name.length
$pos=$length - 16
$org_name_short = $org_name.substring(0, $pos)
$spURL = "https://" + $org_name_short + "-admin.sharepoint.com"

Connect-SPOService -Url $spURL

@ThoughtContagion ThoughtContagion self-assigned this Jan 31, 2023
@ThoughtContagion ThoughtContagion added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 31, 2023
@ThoughtContagion
Copy link
Collaborator

Hi there!

Thank you for using 365Inspect!

This appears to be caused by some lack of clarity in our README, which we will update to clarify the language used.
We are also exploring the potential for a way to pull this information without the need to require direct user input to make it easier for users and reduce the amount of information needed to begin the assessment.

From our README:

To break down the parameters further:

OrgName is the name of the core organization or "company" of your O365 instance, which will be inspected.
If you do not know your organization name, you can navigate to the list of all Exchange domains in O365. The topmost domain should be named domain_name.onmicrosoft.com. In that example, domain_name is your organization name and should be used when executing 365Inspect.

For example, if your domain listed is mycompany.onmicrosoft.com, then your $org_name variable would be mycompany.

@ThoughtContagion ThoughtContagion linked a pull request Jan 31, 2023 that will close this issue
@actionitservices
Copy link
Author

ah true, my bad. Thanks @ThoughtContagion. Handy script!
I can see those changes in the latest commit, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants