Running MSOL commands against a list lof users from csv.

Hi All, I was kindly helped here
with a similar issue only the solution doesn't seem to work for the Get-MSolUser commands:
What I am trying to achieve is to set the users -UsageLocation to GB and then to Set-MSolUserLicense to our Enterprise. So for example I have a list of UPN for our UK users in a csv:
UserPrincipalName
[email protected]
[email protected]
Here is what I have tried just to run a Get command first against the csv:
Import-CSV "C:\emails.csv" | %{Get-MSolUser -identity $_.UserPrincipleName | fl}
Which gives me this error:
Import-CSV "C:\emails.csv" | %{Get-MSolUser -identity $_.UserPrincipleName | fl}
+                                            
~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-MsolUser], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Online.Administration.Automation.GetUser
I can confirm that if I run this command
Get-MSolUser -All -UnlicensedUsersOnly | FT UserPrincipalName,DisplayName,IsLicensed,UsageLocation
I do get a list of all users who are unlicensed.
Any help on where I am going wrong would be greatly appreciated.

Thanks Fred, that looks a lot better:
Does this look correct to you?
Import-CSV"C:\emails.csv"|%{Get-MSolUser-SearchString$_.UserPrincipleName
|Set-MsolUser-UsageLocationGB
Or do I need to define a ForEach -Object?

Similar Messages

  • Running Commands against a list of users in a csv (O365)

    Hi All, I posted this in the
    O365 forum but was advised to post here instead.
    I am trying to run some post deployment scripts on a list of users who have been migrated to O365. The list is from a csv.
    Here is what I currently have, at the moment I am just trying to run Get Commands and then once I am happy I will when run the deployment Set commands.
    So I have a csv file that loks like this:
    UserPrincipleName
    [email protected]
    [email protected]
    I have tried running the following, but the results I get show me results for every mailbox on our O365 organisation, not the 2 in my csv file.
    Just so you know I can confirm  I am connected to the O365 Powershell session:
    Import-CSV "C:\emails.csv" | ForEach-Object {Get-Mailbox | fl}
    I have also tried this and I get the same results:
    $list = Import-Csv "C:\emails.csv"
    foreach($entry in $list) {
    $User = $entry.User
    Get-Mailbox -id $User
    Any help would be greatly appreciated.

    Hi All, I posted this in the
    O365 forum but was advised to post here instead.
    I am trying to run some post deployment scripts on a list of users who have been migrated to O365. The list is from a csv.
    Here is what I currently have, at the moment I am just trying to run Get Commands and then once I am happy I will when run the deployment Set commands.
    So I have a csv file that loks like this:
    UserPrincipleName
    [email protected]
    [email protected]
    I have tried running the following, but the results I get show me results for every mailbox on our O365 organisation, not the 2 in my csv file.
    Just so you know I can confirm  I am connected to the O365 Powershell session:
    Import-CSV "C:\emails.csv" | ForEach-Object {Get-Mailbox | fl}
    I have also tried this and I get the same results:
    $list = Import-Csv "C:\emails.csv"
    foreach($entry in $list) {
    $User = $entry.User
    Get-Mailbox -id $User
    Any help would be greatly appreciated.
    Import-CSV
    "C:\emails.csv" |
    ForEach-Object
    {Get-Mailbox $_| fl}

  • Hi am having issues with getting the list of users from the Active Director

    Hi am having issues with getting the list of users from the Active Directory, can anyone help me with this!

    Hi Jason,
    Try this:
    1.  In Ultiboard select Tools>>Netlist Editor>>Pins, press the Delete button
    2.  Select all nets in the Select the Net to Delete dialog and then press the Delete button.  This will clear all nets in the layout, don't worry all traces, parts are still on the design.
    3.  Go to Multisim and select Transfer>>Forward annotate to Ultiboard.    This will add all nets that you removed back and it should fix the pin problem
    Tien P.
    National Instruments

  • How do you import a list of users from a file? (BPC 7.5NW)

    In adding users from a network domain, the related personnel filter provides three choices.  One of the choices allows a BPC administrator to import a list of users from file.  For some reason, the radio button alongside that option is grey and the choice is inoperable.  Does anyone know what steps-configuration or later-must be taken to make this choice operable and to be able to import the list of users from a file?
    Edited by: Greg Tyrl on Jul 11, 2011 8:17 PM

    make a new addressbook and in that import Outlook's

  • Query list of users from LDAP

    Hi Gurus,
    I am trying to programatically query the list of users belonging to a particular user-group, from LDAP.
    LDAP is deployed on Weblogic as a 'provider'.
    I have the following details of the LDAP instance - host:port, security principal (CN=aaa,OU=bbb,OU=ccc,DC=ddd,DC=com), LDAP password (credential), User Base DN.
    I tried the following using BPEL:
    <sequence name="main">
        <!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess1.wsdl) -->
        <receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>
        <!-- Generate reply to synchronous request -->
        <assign name="Assign1">
          <copy>
            <from>ora:getContentAsString(ldap:listUsers('people','ou=people'))</from>
            <to>$outputVariable.payload/client:result</to>
          </copy>
        </assign>
        <reply name="replyOutput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="outputVariable"/>
      </sequence>
    </process>
    and following is the content of the directories.xml that I have created:
    <?xml version="1.0" ?>
    <directories>
    <directory name='people'>
    <property name="java.naming.provider.url">ldap://<host>:<port></property>
    <property
    name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</property>
    <property name="java.naming.security.principal">CN=aaa,OU=bbb,OU=ccc,DC=ddd,DC=com</property>
    <property name="java.naming.security.authentication">simple</property>
    <property name="java.naming.security.credentials">password</property>
    <property name="entryDN">User Base DN</property>
    </directory>
    </directories>
    When I run this BPEL process, I get a blank value on my output variable -
    <outputVariable>
    <part  name="payload">
    <processResponse>
    <result><users xmlns="http://schemas.oracle.com/bpel/ldap"/></result>  
    </processResponse>
    </part>
    </outputVariable>
    Is there something I am missing here?
    Regards,
    Arindam

    slight change in my approach here:
    I would like to use welogic provider to connect to this LDAP
    so... instead of MyProgram --> LDAP, it should now be MyProgram --> Weblogic/SecurityRealms/myrealm/Providers/myAuthenticator --> LDAP
    in this guess, i wont be using LDAP connection details, instead the weblogic host/port and Authenticator name should be sufficient
    How can I programatically query the list of users using this approach?

  • Extracting List of Users from BO Server

    Hi All,
    As an administration requirement we have to extract list of users within our BO server. I looked upon the forum and found that we can use query builder for the purpose.
    I used query builder and ran query " Select SI_NAME from CI_SYSTEMOBJECTS where SI_NAMEDUSER=1 AND SI_KIND='User' " to list down the users. No issues till this point, the query ran fine and gave list of users in the server but I couldn't find a way to take export of this list. Then I thought of creating a webi report on top of CMS database pulling column "dbo.CMS_Aliases6.Alias" into report but that shows some ids for all enterprise users.
    Please let me know if there is any other method that I can implement to take export of user list from server. I know this can be achieved using SDK but I want to try it at last.
    Thanks,
    Chandra

    Hi
    After clicking the Export .
    1.Go folders>administration tools folder
    2.Right click on Administrator tools >Security query export >
    3.Click on History
    4 In the History tab ,you will see the program Object schedule(See screen shot2)
    5.Now clicking on the Instance Time link will open a .txt file and shows you the rights
    6. while saveing this file save as in CSV format.
    If you want to see only users after saveing the csv , Just apply the filter on Rights collections check only system . It will dis play only the users.
    Useing Query Builder also We can do
    After Genrated the Report go to file and save as html in your local .
    Select the HTML Page and Right click Open with Excel . The report will open in excel .

  • How to I get list of Users from LDAP in a Task?

    Hi,
    Can any one tell me that how can I communicate with a LDAP Resource and get all the users from the LDAP as a list in an activity in the task?
    Can anyone tell me how can I do this?

    The "Stick Slidelet" option has been unchecked all the time, but the "X" button stayed.
    Meanwhile, on saving Captivate asked me for the umpteenth time if I wanted to convert my project from Captivate 7 to 8. It seems like I originally had a version 7 trial installed, but my licensed copy clearly states that it is version 8 now, and I have answered this dialog with "please convert" in this project every time before.
    Anyway. Now my original slidelets still have the unwanted "X" button. But when I create a new slidelet from scratch, it does not have the button anymore.

  • Bulk Create Users from CSV: Error: "Put": "There is no such object on the server."?

    Hi,
    I'm using the below PowerShell script, by @hicannl which I found on the MS site, for bulk creating users from a CSV file.
    I've had to edit it a bit, adding some additional user fields, and removing others, and changing the sAMAccount name from first initial + lastname, to firstname.lastname. However now when I run it, I get an error saying:
    "[ERROR]     Oops, something went wrong: The following exception occurred while retrieving member "Put": "There is no such object on the server."
    The account is created in the default OU, with the correct firstname.lastname format, but then it seems to error at setting the "Set an ExtensionAttribute" section. However I can't see why!
    Any help would be appreciated!
    # ERROR REPORTING ALL
    Set-StrictMode -Version latest
    # LOAD ASSEMBLIES AND MODULES
    Try
    Import-Module ActiveDirectory -ErrorAction Stop
    Catch
    Write-Host "[ERROR]`t ActiveDirectory Module couldn't be loaded. Script will stop!"
    Exit 1
    #STATIC VARIABLES
    $path = Split-Path -parent $MyInvocation.MyCommand.Definition
    $newpath = $path + "\import_create_ad_users_test.csv"
    $log = $path + "\create_ad_users.log"
    $date = Get-Date
    $addn = (Get-ADDomain).DistinguishedName
    $dnsroot = (Get-ADDomain).DNSRoot
    $i = 1
    $server = "localserver.ourdomain.net"
    #START FUNCTIONS
    Function Start-Commands
    Create-Users
    Function Create-Users
    "Processing started (on " + $date + "): " | Out-File $log -append
    "--------------------------------------------" | Out-File $log -append
    Import-CSV $newpath | ForEach-Object {
    If (($_.Implement.ToLower()) -eq "yes")
    If (($_.GivenName -eq "") -Or ($_.LastName -eq ""))
    Write-Host "[ERROR]`t Please provide valid GivenName, LastName. Processing skipped for line $($i)`r`n"
    "[ERROR]`t Please provide valid GivenName, LastName. Processing skipped for line $($i)`r`n" | Out-File $log -append
    Else
    # Set the target OU
    $location = $_.TargetOU + ",$($addn)"
    # Set the Enabled and PasswordNeverExpires properties
    If (($_.Enabled.ToLower()) -eq "true") { $enabled = $True } Else { $enabled = $False }
    If (($_.PasswordNeverExpires.ToLower()) -eq "true") { $expires = $True } Else { $expires = $False }
    If (($_.ChangePasswordAtLogon.ToLower()) -eq "true") { $changepassword = $True } Else { $changepassword = $False }
    # A check for the country, because those were full names and need
    # to be land codes in order for AD to accept them. I used Netherlands
    # as example
    If($_.Country -eq "Netherlands")
    $_.Country = "NL"
    ElseIf ($_.Country -eq "Austria")
    $_.Country = "AT"
    ElseIf ($_.Country -eq "Australia")
    $_.Country = "AU"
    ElseIf ($_.Country -eq "United States")
    $_.Country = "US"
    ElseIf ($_.Country -eq "Germany")
    $_.Country = "DE"
    ElseIf ($_.Country -eq "Italy")
    $_.Country = "IT"
    Else
    $_.Country = ""
    # Replace dots / points (.) in names, because AD will error when a
    # name ends with a dot (and it looks cleaner as well)
    $replace = $_.Lastname.Replace(".","")
    $lastname = $replace
    # Create sAMAccountName according to this 'naming convention':
    # <FirstName>"."<LastName> for example
    # joe.bloggs
    $sam = $_.GivenName.ToLower() + "." + $lastname.ToLower()
    Try { $exists = Get-ADUser -LDAPFilter "(sAMAccountName=$sam)" -Server $server }
    Catch { }
    If(!$exists)
    # Set all variables according to the table names in the Excel
    # sheet / import CSV. The names can differ in every project, but
    # if the names change, make sure to change it below as well.
    $setpass = ConvertTo-SecureString -AsPlainText $_.Password -force
    Try
    Write-Host "[INFO]`t Creating user : $($sam)"
    "[INFO]`t Creating user : $($sam)" | Out-File $log -append
    New-ADUser $sam -GivenName $_.GivenName `
    -Surname $_.LastName -DisplayName ($_.LastName + ", " + $_.GivenName) `
    -StreetAddress $_.StreetAddress -City $_.City `
    -Country $_.Country -UserPrincipalName ($sam + "@" + $dnsroot) `
    -Company $_.Company -Department $_.Department `
    -Title $_.Title -AccountPassword $setpass `
    -PasswordNeverExpires $expires -Enabled $enabled `
    -ChangePasswordAtLogon $changepassword -server $server
    Write-Host "[INFO]`t Created new user : $($sam)"
    "[INFO]`t Created new user : $($sam)" | Out-File $log -append
    $dn = (Get-ADUser $sam).DistinguishedName
    # Set an ExtensionAttribute
    If ($_.ExtensionAttribute1 -ne "" -And $_.ExtensionAttribute1 -ne $Null)
    $ext = [ADSI]"LDAP://$dn"
    $ext.Put("extensionAttribute1", $_.ExtensionAttribute1)
    Try { $ext.SetInfo() }
    Catch { Write-Host "[ERROR]`t Couldn't set the Extension Attribute : $($_.Exception.Message)" }
    # Move the user to the OU ($location) you set above. If you don't
    # want to move the user(s) and just create them in the global Users
    # OU, comment the string below
    If ([adsi]::Exists("LDAP://$($location)"))
    Move-ADObject -Identity $dn -TargetPath $location
    Write-Host "[INFO]`t User $sam moved to target OU : $($location)"
    "[INFO]`t User $sam moved to target OU : $($location)" | Out-File $log -append
    Else
    Write-Host "[ERROR]`t Targeted OU couldn't be found. Newly created user wasn't moved!"
    "[ERROR]`t Targeted OU couldn't be found. Newly created user wasn't moved!" | Out-File $log -append
    # Rename the object to a good looking name (otherwise you see
    # the 'ugly' shortened sAMAccountNames as a name in AD. This
    # can't be set right away (as sAMAccountName) due to the 20
    # character restriction
    $newdn = (Get-ADUser $sam).DistinguishedName
    Rename-ADObject -Identity $newdn -NewName ($_.LastName + ", " + $_.GivenName)
    Write-Host "[INFO]`t Renamed $($sam) to $($_.GivenName) $($_.LastName)`r`n"
    "[INFO]`t Renamed $($sam) to $($_.GivenName) $($_.LastName)`r`n" | Out-File $log -append
    Catch
    Write-Host "[ERROR]`t Oops, something went wrong: $($_.Exception.Message)`r`n"
    Else
    Write-Host "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) already exists or returned an error!`r`n"
    "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) already exists or returned an error!" | Out-File $log -append
    Else
    Write-Host "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) will be skipped for processing!`r`n"
    "[SKIP]`t User $($sam) ($($_.GivenName) $($_.LastName)) will be skipped for processing!" | Out-File $log -append
    $i++
    "--------------------------------------------" + "`r`n" | Out-File $log -append
    Write-Host "STARTED SCRIPT`r`n"
    Start-Commands
    Write-Host "STOPPED SCRIPT"

    Here is one I have used.  It can be easily updated to accommodate many needs.
    function New-RandomPassword{
    $pwdlength = 10
    $bytes = [byte[]][byte]1
    $pwd=[string]""
    $rng=New-Object System.Security.Cryptography.RNGCryptoServiceProvider
    while (!(($PWD -cmatch "[a-z]") -and ($PWD -cmatch "[A-Z]") -and ($PWD -match "[0-9]"))){
    $pwd=""
    for($i=1;$i -le $pwdlength;$i++){
    $rng.getbytes($bytes)
    $rnd = $bytes[0] -as [int]
    $int = ($rnd % 74) + 48
    $chr = $int -as [char]
    $pwd = $pwd + $chr
    $pwd
    function AddUser{
    Param(
    [Parameter(Mandatory=$true)]
    [object]$user
    $pwd=New-RandomPassword
    $random=Get-Random -minimum 100 -maximum 999
    $surname="$($user.Lastname)$random"
    $samaccountname="$($_.Firstname.Substring(0,1))$surname"
    $userprops=@{
    Name=$samaccountname
    SamAccountName=$samaccountname
    UserPrincipalName=“$[email protected]”)
    GivenName=$user.Firstname
    Surname=$surname
    SamAccountName=$samaccountname
    AccountPassword=ConvertTo-SecureString $pwd -AsPlainText -force
    Path='OU=Test,DC=nagara,DC=ca'
    New-AdUser @userprops -Enabled:$true -PassThru | |
    Add-Member -MemberType NoteProperty -Name Password -Value $pwd -PassThru
    Import-CSV -Path c:\users\administrator\desktop\users.csv |
    ForEach-Object{
    AddUser $_
    } |
    Select SamAccountName, Firstname, Lastname, Password |
    Export-Csv \accountinformation.csv -NoTypeInformation
    ¯\_(ツ)_/¯

  • How to get list of user from Role in workflow

    Hi,
    I want to send notification to all user belongs to a certain role in OIM.
    How can i do this?
    My req:- User put's request for provisioning. now we have to send notification to all the approver about the request.
    I know i have to use BPEL for sending notification.
    But can some one let me know how can i get email id of approver in BPEL.

    Make a groups in OIM and assign all the approves for that role in that group.
    Select this group as an approve in SOA composite.
    Now when ever any approval request is send for provisioning it will go to all the members of that group.

  • How to check list of users from OS level with type and validity AIX+DB2

    Hi,
    We have 40 clients in our ECC -PRD system. we do not have authorizations to login all clients , only we have 000 accessonly.
    we need to check all users type and validity in the system. can any one please help me this script.
    regards,
    balarami

    Hello,
    Yes you can check the user validity and tye from OS level with DB script.
    ORACLE SQL scripts : I assume that schema for your system as sapr3.
    First you check the table fields by desc sapr3.usr02;
    then can select these fields for user as select <field name1>, <field name2> from sapr3.user02 where uname=<required user name> and mandt=<client>;
    check exact details before you execute script @ ORA level*
    If you want to see logged on users - you can see them with your '000' ID for all 40 clients.
    Hope this helps.
    Thanks,
    Amit Thombare

  • Help with script for "Import AD users from CSV with checks first"

    Hi everyone.
    Can anyone tell me if i am on the right track here?
    I want to be able to provide a CSV with users and import into a new AD domain/forest. But i know there already are some AD accounts so i need to run some checks. For now i am checking only on Name and Email.
    The issue i have is is with "write-host "$UserFullName was not found. Creating user.". It outputs this 19 times which is the same amount of times as there are users in AD in this OU.
    Not sure if my method is right. 
    $allImportedUsers=@()
    $allUsersArray=@()
    $searchbase="OU=PL,DC=EUECS,DC=CORP,DC=ARROW,DC=COM"
    $path = "OU=Users,OU=PL,DC=EUECS,DC=CORP,DC=ARROW,DC=COM"
    $allImportedUsers = Import-CSV polandusers_edited.csv
    $allUsersArray = Get-ADObject -LDAPFilter "objectClass=User" -SearchBase $searchbase -Properties * | select *
    $allImportedUsers | ForEach-Object {
    $Firstname = $_.givenname
    $Lastname = $_.surname
    $UserMail = $_.EmailAddress
    $UserFullName = $Firstname+" "+$Lastname
    $importUserSAM = $_.Samaccountname
    $allUsersArray | ForEach-Object {
    $currUserFirstname = $_.givenName
    $currUserLastname = $_.sn
    $currUserMail = $_.mail
    $currUserFullName = $_.name
    $currUserSAM = $_.samaccountname
    $currUserDN = $_.DistinguishedName
    if($currUserFullName -eq $UserFullName) {
    write-host "CSV $UserFullName matched on name"
    $userMatched=1
    if($currUserMail -eq $UserMail -AND $userMatched -ne 1) {
    write-host "CSV $UserFullName matched on email"
    $userMatched=1
    if($userMatched -ne 1) {
    write-host "$UserFullName was not found. Creating user."
    $userMatched=0
    If only i had a cool signature!! ;)

    Move below to outside the inner for-each loop:
    if($userMatched -ne 1) {
    write-host "$UserFullName was not found. Creating user."
    $userMatched=0
    so the bottom should look like
    }if($userMatched -ne 1) {
    write-host "$UserFullName was not found. Creating user."
    $userMatched=0

  • Listing of Users with associated Groups

    Is there an easy way to generate a listing of APEX users and their associated groups? I know how to get the current user and how to determine what groups they are part of, but am looking for a simple query I can run to generate a complete list of Users and their associated groups.
    Thanks

    if you want to return the application groups that a user is assigned to, you can use the WWV_FLOW_GROUP_USERS intersection table. For example;
    SELECT group_name
    FROM wwv_flow_group_users
    WHERE user_id = (SELECT user_id
    FROM wwv_flow_users
    WHERE user_name ='MRITTMAN')
    would list out all of the groups that the user 'MRITTMAN' belongs to
    So to get all users and their groups, remove the where clause..
    (You will need read rights to the view, some dba's deny read rights to these objects in the name of security..)
    Thank you,
    Tony Miller
    Webster, TX

  • Powershell Script: Add users from an OU to an AD security Group

    Hi
    can anybody point me to a link or have a script which I can get a list of users from an OU then put them into an AD security group
    Regards

    Hi - thanks for the info the script didn't run as expected.
    What we are trying to achieve is that we have an OU with several child OU's below and we need to capture all user accounts from al OU's and then either be able to export to a CSV or pipe the out put to an AD group
    dsquery user "OU=organizationalunit,DC=name,dc=com" -limit 0 >>
    filename.txt
    with the filename.txt you can do this:
    for /f "tokens=* delims= " %i in (filename.txt) do dsmod group "CN=groupname,OU=organizationalUnit,DC=name,DC=com" -addmbr %i
    or, just pipe the initial results into the dsmod command:
    dsquery user "OU=organizationalunit,DC=name,dc=com" | dsmod group "CN=groupname,OU=organizationalUnit,DC=name,DC=com" -addmbr

  • Script to logout users from a specific group, when queries are long

    Hi,
    I have a requirement that users from a specific group need to be logged out, when they are running queries for more than say 20 mins.
    I could get the list of users from that group and could get the list of active sessions on the application, but I get too many info there like connection IP request state etc. and if I spool it to a file, output is not very easy to format to select what's required, rather I have to write lot of shell scripting to format the file.
    So my question here is to know if there's a MAXL script or any other method through which I can just get only couple of columns from the "display session on application <app name>" that I require for my work like username, session ID, DB connect time, and request time.
    Thanks!!

    There are a number of ways to accomplish this, but AFAIK none of them is straightforward like writing a script to accomplish the task.
    This could be accomplished quite readily with the Essbase API.
    Unfortunately, when Maxl outputs tabular data such as what comes out after DISPLAY SESSION ALL; - it comes out as all one big string with lots of spaces.
    So to parse that output you would need to use a language that can tokenize the text into a collection and parse that for the users.
    Then you need to do the same sort of thing after running DISPLAY USER IN GROUP ALL; (or instead of all, use a specific group name);
    Then run ALTER SYSTEM LOGOUT SESSION BY USER <parsed_username>;
    What would be ideal (hello Oracle... <wink> ) is a MAXL command ALTER SYSTEM LOGOUT SESSION BY GROUP <GroupName>;
    The way I would approach this would be to write a little utility that does exaclty what you seek:
    - Scan the current session periodically (say, once every 5 mins)
    - for each user that belongs to group(s) <group>(<group>...)
    - if user has an open query running longer than n minutes, kill the user request.
    This way you're not kicking people, your just taking back resources. Of course you can be more aggressive and code it to kick the user by forcefully ending (invalidating) his session too.
    I can give you a hand with this offline if you want.
    Robb

  • Spool list not available from SM37

    Hi All,
    We have scheduled a job and running successfully.
    But spool list not displayed from SM37, whereas spool request generated in SP01 at the same time when the job is completed.
    We've checked with the developer and they dint find anything wrong from program end.
    Kindly suggest what is going wrong here.
    Thanks in advance......

    Hi,
    Apply the following SAP notes to resolve this problem:
    1372936 - Spool lists no longer displayed from SM37 after SP
    1174127 - Job refers to incorrect spool request
    regards,
    Aidan

Maybe you are looking for