Forum Discussion

Unknowncharact0's avatar
Unknowncharact0
Regular Visitor
9 months ago
Solved

SharePoint Access

Hi, how do I give access to SharePoint to "onmicrosoft.com" service account. When I try to grant access from SharePoint folder, I don't see that account listed, only "@company.com" accounts are ther...
  • tharunkumarRTK's avatar
    9 months ago

     can you check if that service account exists in your organization's active directory? You can

     

    • Open  https://portal.azure.com

    • Search for User from the global search bar at the top

    • View the list of all users in your Azure AD

    • Search for the specific service account

    • If you can find it, then it is part of your Azure AD; otherwise, it is not

    • If it is part of your Azure AD, you can grant access to it, regardless of whether it has a SharePoint or Microsoft 365 license

    • If it is not  part of your Azure AD, it is considered an external account. In that case, you should first invite it to your organization’s Azure AD as a B2B user. Once the invitation is accepted, the account will appear in your directory, and you can then grant SharePoint access or assign the necessary license.

      https://learn.microsoft.com/en-us/entra/external-id/what-is-b2b

       

       

       

       

      Connect on LinkedIn

       

       

       








      Did I answer your question? Mark my post as a solution!
      If I helped you, click on the Thumbs Up to give Kudos.

      Proud to be a Super User!


    •  

    •  

    •  

    •  

    •  

    Unknowncharact0

  • Poojara_D12's avatar
    9 months ago

    Hi Unknowncharact0 

    When you try to give access to a SharePoint folder or site, you can only directly grant permissions to users or service accounts that exist within your organization’s Azure Active Directory (AAD) tenant and are recognized as valid members or guests of that directory. If your Power BI gateway or service principal uses an account with the “@tenant.onmicrosoft.com” domain, it may not appear in the SharePoint sharing dialog if it’s not a licensed or active user object in AAD. By default, SharePoint Online recognizes only authenticated directory users, so unless the “@onmicrosoft.com” account is explicitly added as a user in AAD (not just a service principal or app registration), it won’t appear in the people picker when you try to share folders or grant permissions.

     

    To fix this, go to the Microsoft 365 Admin Center → Users → Active users, and check if the “@onmicrosoft.com” account exists as a user. If not, create a new user with that UPN or assign a license if required for SharePoint access. Alternatively, if the account represents an Azure App Registration (service principal) used by Power BI or another service, you can’t directly grant folder-level SharePoint access through the UI — instead, you must use Microsoft Graph or SharePoint API to grant app-only access by assigning the appropriate App permissions (Sites.Selected) in Azure and then granting the app permission to that specific SharePoint site using PowerShell or Graph API.

     

    In short, if it’s a user account, make sure it’s an active AAD user; if it’s a service principal, use app-based permissions rather than trying to grant access through the SharePoint sharing dialog.